尝试在生产中运行delayed_job时出错
我正在使用delayed_job发送电子邮件,在开发过程中启动进程时一切正常:
jobs:work
问题出现在我的共享主机上,在生产中,当我尝试使用“delayed_job”脚本启动进程时(详细信息此处)
script/delayed_job start staging
给我以下错误
/home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:237:in `require': no such file to load -- delayed/command (LoadError)
from /home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:237:in `require'
from /home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:636:in `new_constants_in'
from /home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/blog/applications/staging/blog/shared/bundle/ruby/1.8/gems/activesupport-3.1.0.rc6/lib/active_support/dependencies.rb:237:in `require'
from script/delayed_job:4
有关如何解决此问题的任何想法吗?
我在 Ruby 1.8.7 上使用 Rails 3.1 和 Phusion Passenger。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用 Capistrano 来做这些事情。
然后你可以简单地将其放入你的deploy.rb文件(或Capfile)中:
当然对我来说更容易=)
I would suggest using Capistrano for these kind of things.
Then you could simply put this in your deploy.rb file (or Capfile):
Certainly made it a lot easier for me =)