configure :development, :production do # Create database and schema for comments if not present begin ActiveRecord::Schema.define(:version => 1) do create_table :posts do |t| t.integer :id, :null => false t.string :title t.text :body t.datetime :created_at, :default => 'NOW()' end end rescue Exception => e puts e end unless Post.table_exists? end