Forum: Ruby on Rails rake aborted!!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7492b14ddb61f186cdb44843ac5a3ac1?d=identicon&s=25 doucie (Guest)
on 2007-02-09 22:42
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!!
This topic is locked and can not be replied to.