0

I am trying to run the database migrations that I've just created. Rake worked well before, I think I messed up the dependencies or the versions. Here is what I get when running.

rake:db:migrate --trace


rake aborted!
no such file to load -- rake/rdoctask
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `require'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `load'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:15
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:6:in `each'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:6
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:214:in `require'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:214:in `initialize_tasks'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:139:in `load_tasks'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `send'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/home/maaz/Desktop/rails_apps/todo/Rakefile:7
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:87:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/bin/rake:37
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Maxsy
  • 225
  • 4
  • 10
  • have you tried `bundle install`, `bundle exec rake db:migrate` and/or reinstall rake ? – MrYoshiji Nov 28 '12 at 15:48
  • Possible related question: http://stackoverflow.com/questions/7826442/no-such-file-to-load-rdoc-task – Emyl Nov 28 '12 at 16:19
  • Are you using RVM? If so, it be pretty quick and easy to try clearing your gemset and bundling again. You can also manually uninstall all gems and try again from scratch. Might get rid of any issues where newer gems are being activated or the like. – MrDanA Nov 28 '12 at 16:20
  • @Emyl tried the solutions from that question. not working – Maxsy Nov 28 '12 at 16:21
  • @MrDanA not using RVM. tried installing the gems again and still no luck :/ – Maxsy Nov 28 '12 at 16:21
  • 1
    the error is indicating that rake cannot find at least one of its tasks as it searches various paths -- mostly defined by Rails. I think @MrYoshiji is on the right track -- if you have potentially different versions of ruby, rails, or rake on the same system, using `bundle exec rake foo:bar` will at least ensure the gems associated with the project are being used. For example, in Rails 3.2.9 there doesn't seem to be a file rake/rdoctask (it's rake/rdoc/task.rb). – Tom Harrison Nov 28 '12 at 16:24
  • @tharrison figured it out. thanks. – Maxsy Nov 28 '12 at 17:07
  • 3
    If you think your solution is one others may benefit from, please post it as an answer. Then you can accept it in a day. – Tom Harrison Nov 28 '12 at 17:12

0 Answers0