solution for rake db:create

I ran into the following error:

WARNING: 'require 'rake/rdoctask'' is deprecated. Please use
'require 'rdoc/tas k' (in RDoc 2.4.2+)' instead.
     at /usr/lib/ruby/vendor_ruby/rake/rdoctask.rb
rake aborted!
uninitialized constant Gem

check ur rake gem version and rubygems if installed or not.

OK…C:\user\ran>gem list -d rake

*** LOCAL GEMS ***

rake (0.9.2.2, 0.9.2, 0.8.7, 0.8.3)
Author: Jim Weirich
Rubyforge: http://rubyforge.org/projects/rake
Homepage: http://rake.rubyforge.org
Installed at (0.9.2.2): C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
(0.9.2): C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
(0.8.7): C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
(0.8.3): C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8

Ruby based make-like utility.

C:\user\ran>bundle show rake
C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rake-0.9.2.2

C:\user\ran>rake db:create
rake aborted!
no such file to load – rdoc/task

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

I guess, its a conflict with using mutiple versions of Rake Gem.

If you have many applications, which require different rake gem versions
to run..

Install RVM,

Do a rvm gemset create gemset_name

and then place appropriate gem versions of rake and other gems in those
project specific gemsets.. to avoid conflicts..