Just to help anyone who has had this hassle. If you are like me, then your problem is that the current version of the rails is 4, and you want to use an older version, for example 3.0.7.
If you set the rails fresh to study it, say, and the tutorial you are using is the version of rails 3.0.x or your work requires using the old version of the rails .. then you can get into this hole.
In my case, I received a relay project 3.0.7, which I threw, and he was asked to study the rails and make some improvements to this code.
So, I just started to study the rails and followed the tutorial until I got this error when doing "rake db: migrate"
rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /Users/pj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `require' /Users/pj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `<top (required)>' /Users/pj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `load' /Users/pj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `block in <top (required)>'
This happened because I used an older version of the rails .. in my case 3.0.7. If you ran "show bundle", as then, you can see that you are using rake version 10.0.0 or something like that ... and you need to use rake 0.9.2 ... where there is a problem coming from ..
The solution for me was to (a) add a gem to my gemfile and (b) install the package
So in my gemfile I added:
gem 'rake', '0.9.2'
Then did
'bundle install'
Received this message:
You have requested: rake = 0.9.2 The bundle currently has rake locked at 10.1.0. Try running `bundle update rake`
And I did it ...
bundle update rake.
And everything went well.
then when I did therake db: migrate, it just worked.
Hope this helps someone. View.
PS: if you are new to rails, like me, and you inherit the old rails application, then for God's sake NEVER run a package update, otherwise you will end up in a world of pain. This command updates all your gems to the latest versions, and you get a lot of incompatibility issues. The only way out of this is if you are fortunate enough to install git and do a "git checkout" to return ...