Ruby on Rails: Fail on rake db:migrate?

I am learning Ruby on Rails by reading Agile Web Development with Rails Second Edition.

I have reached chapter six page 80. We want to add a new ‘price’ column. Unfortunately, running rake db:migrate gave me the following error:
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.[]

I am using Locomotive (with the cool locomotive icon nonetheless!).

I did the following to resolve the rake aborted issue:
1. Open up your application from Locomotive in the terminal window.
2. Run the following command:
gem install rails –source http://gems.rubyonrails.org –include-dependencies
3. Edit your config/enviroment.rb set
4. Find and change the following:
RAILS_GEM_VERSION = ‘1.1.6.5618
5. Try rake db:migrate again and you should be OK now.

Leave a Reply