简体   繁体   中英

rake aborted! no such file to load — html/document

I've been trying to get a rake task setup, but when I try to run it, I get

rake aborted!
no such file to load -- html/document

The following is the trace for when I try to run rake -T --trace :

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb:2
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions.rb:48:in `included'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions.rb:47:in `each'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions.rb:47:in `included'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions.rb:66:in `include'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/assertions.rb:66
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/test_process.rb:1
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/actionpack/lib/action_controller/integration.rb:3
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/var/www/phonelog_rb/lib/tasks/update_calls.rake:1
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/phonelog_rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load'
/var/www/phonelog_rb/vendor/rails/railties/lib/tasks/rails.rb:8
/var/www/phonelog_rb/vendor/rails/railties/lib/tasks/rails.rb:8:in `each'
/var/www/phonelog_rb/vendor/rails/railties/lib/tasks/rails.rb:8
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/var/www/phonelog_rb/Rakefile:11
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Any help you can provide is greatly appreciated. Let me know if you need any further details.

/var/www/phonelog_rb/lib/tasks/update_calls.rake:1

该文件的顶部似乎有东西(我猜是require )正在引起麻烦。

It sounds like a Gem that your application requires isn't present when you're starting the task. Try using bundle exec rake and see if that corrects the problem.

Looks like rake is unable to find rdoc/task or testtask . Try adding them to the gem file (eg - gem 'rdoc') and run bundle install.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM