“没有要加载的文件——treetop/runtime”运行“rake jobs:work”
当我尝试运行“rails server”或“rake jobs:work”时,出现错误: “没有要加载的文件——treetop/runtime”
完整跟踪:
macbook-pro-2:domain ryan$ rake jobs:work --trace(in /Applications/htdocs/domain) rake 中止! 没有要加载的文件——treetop/runtime /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68:in require' /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68 /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61:in
each' /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61 /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1:in require' /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1 /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5:in
需要' /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5 /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in require' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in
require' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in each' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in
require' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in each' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in
require' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in require' /ApApplications/htdocs/domain/config/application.rb:7 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' /Applications/htdocs/domain/Rakefile:4 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
加载' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in raw_load_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
load_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
load_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/local/bin/rake:19:in
加载' /opt/local/bin/rake:19
在我的 Gemfile 中我有: “宝石‘延迟工作’”
when i try and run the "rails server" or "rake jobs:work" i get the error:
"no such file to load -- treetop/runtime"
full trace:
macbook-pro-2:domain ryan$ rake jobs:work --trace(in /Applications/htdocs/domain) rake aborted!
no such file to load -- treetop/runtime
/opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68:in require'
each'
/opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68
/opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61:in
/opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61
/opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1:in require'
require'
/opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1
/opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5:in
/opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in require'
require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in each'
require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in each'
require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in require'
gem_original_require'
/ApApplications/htdocs/domain/config/application.rb:7
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
load'
/Applications/htdocs/domain/Rakefile:4
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in raw_load_rakefile'
load_rakefile'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling'
load_rakefile'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run'
standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run'
load'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/local/bin/rake:19:in
/opt/local/bin/rake:19
in my Gemfile i have:
"gem 'delayed_job'"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过
bundle exec
运行它:bundle execrails server
和bundle exec rake jobs:work
Run it through
bundle exec
:bundle exec rails server
andbundle exec rake jobs:work
在 ruby 1.8 上有同样的问题,但在 ruby 1.9 上没有
并将其添加到我的 Gemfile 中解决了这个问题
Had the same issue on ruby 1.8 but not on ruby 1.9
and solved it by adding this to my Gemfile
原来我安装了旧的 gems,导致了问题
邮件(2.2.14、2.2.12、2.2.11、2.2.10)
Treetop(1.4.9、1.4.8)
我卸载了旧的,现在一切正常
turns out i had old gems installed that were causing the issue
mail (2.2.14, 2.2.12, 2.2.11, 2.2.10)
treetop (1.4.9, 1.4.8)
i uninstalled the old ones and everything works great now