I have been studying/working from the "Agile Rails" book for a little
while, and I am at the point where we are building the program called
''depot'', I am doing my second migrate and I receive an error..
the error
is as follows:
[code]
C:\InstantRails\rails_apps\depot>rake db:migrate
(in C:/InstantRails/rails_apps/depot)
== AddPrice: migrating
=======================================================-- add_column(:products,
:price, :decimal, {:precision=>8, :scale=>2,
:default=>
0})
rake aborted!
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.[]
(See full trace by running task with --trace)
C:\InstantRails\rails_apps\depot>
[/code]
The code I am using is directly from the book itself, and I have been
trying to research this on the rails documentation, but its of little
use.. :( the code is pasted below..
[code]
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
[/code]
As well, (maybe its convenient), I have pasted the versions of
everything I am currently running.
[code]
Ruby version 1.8.5 (i386-mswin32)
RubyGems version 0.9.0
Rails version 1.1.6
Active Record version 1.14.4
Action Pack version 1.12.5
Action Web Service version 1.1.6
Action Mailer version 1.2.5
Active Support version 1.3.1
Application root C:/InstantRails/rails_apps/depot
Environment development
Database adapter mysql
Database schema version 1
[/code]
I hope someone is able to help, I am wanting to study more, and learn,
but this is sorta breaking that apart :P
Thanks for any help!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---