OK, I've created the following migration class CreateProducts < ActiveRecord::Migration def self.up create_table :products do |t| t.column :title, :string t.column :description, :text t.column :image_url, :string end end def self.down drop_table :products end end This has created a table no problem. I've then added another column using the following ruby script/generate migration add_price This has worked. class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision =>8, :scale =>2, :default =>0 end def self.down remove_column :products, :price end end After creating the 002 migration file above and running rake db:migrate I get a rake aborted message which says: You have a nil object when you didn't expect it You might have expected an instance of array The error occured while evaluating nil. WTF?? Help!!
on 2007-02-09 22:42