Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no such file to load -- rdoc/task

When I run

rake db:create

I receive this error

rake aborted!
no such file to load -- rdoc/task

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

Here is the --trace

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/home/tpeg/rails_apps/Test/Rakefile:8
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:78:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:61:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

I have rake 0.9.2 and rdoc 3.11 installed. I am running these commands in my app's directory.

like image 577
Jarred Avatar asked Oct 19 '11 18:10

Jarred


2 Answers

I had the same problem.

I solved it by adding gem 'rdoc' to my Gemfile and then run bundle install.

like image 95
David Avatar answered Oct 19 '22 12:10

David


If you're not using a Gemfile, it's likely that switching your line in your Rakefile from this:

require 'rake/rdoctask'

to this

require 'rdoc/task'

will work. It did for me.

Also try a

gem install rdoc
like image 13
Neal Avatar answered Oct 19 '22 11:10

Neal