Rake db:migrate aborted

I’m reading the rails tutorial book and in chapter 6 page 199 I have
to make a rake db:migrate, but I get this error:

rake aborted! undefined method `prerequisites’ for nil:NilClass

(See full trace by running task with --trace)

When I try with rake db:migrate --trace I get the following errors:

rake aborted!
undefined method prerequisites' for nil:NilClass /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.0.1/lib/ rspec/rails/tasks/rspec.rake:3:in<top (required)>’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.0.1/lib/
rspec-rails.rb:10:in load' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.0.1/lib/ rspec-rails.rb:10:inblock in class:Railtie
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/
rails/railtie.rb:183:in call' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/ rails/railtie.rb:183:inblock in load_tasks’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/
rails/railtie.rb:183:in each' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/ rails/railtie.rb:183:inload_tasks’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/
rails/engine.rb:396:in block in load_tasks' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/ rails/application/railties.rb:8:ineach’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/
rails/application/railties.rb:8:in all' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/ rails/engine.rb:396:inload_tasks’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/
rails/application.rb:103:in load_tasks' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/ rails/railtie/configurable.rb:30:inmethod_missing’
/Users/jeanosorio/ror/sample_app/Rakefile:7:in <top (required)>' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/ rake_module.rb:25:inload’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/
rake_module.rb:25:in load_rakefile' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/ application.rb:495:inraw_load_rakefile’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/
application.rb:78:in block in load_rakefile' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/ application.rb:129:instandard_exception_handling’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/
application.rb:77:in load_rakefile' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/ application.rb:61:inblock in run’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/
application.rb:129:in standard_exception_handling' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/ application.rb:59:inrun’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/bin/rake:
32:in <top (required)>' /Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:inload’
/Users/jeanosorio/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `’

I tried update my gems, but I still get the last error. Can anybody
help me to solve this issues please.

try
gem install rake

i am not sure, if this works for others or not. as i am beginner.
but it worked for me.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs