ruby-on-rails – 延迟的工作不会开始使用Capistrano

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 延迟的工作不会开始使用Capistrano前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我不能使用capistrano食谱启动延迟工作流程.这是我得到的错误.
/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.1/lib/delayed/command.rb:62:in `mkdir': File exists - /my_app/server/releases/20101120001612/tmp/pids (Errno::EEXIST)

这是capistrano代码(注意:我已经尝试了启动/重新启动命令)

after "deploy:restart","delayed_job:start"
task :start,:roles => :app do          
  run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job -n 2 start"
end

来自部署日志的更多详细信息错误

executing command
 [err :: my_server] /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.1/lib/delayed/command.rb:62:in `mkdir': File exists - /my_app/server/releases/20101120001612/tmp/pids (Errno::EEXIST)
 [err :: my_server] from /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.1/lib/delayed/command.rb:62:in `daemonize'
 [err :: my_server] from script/delayed_job:5:in `<main>'
    command finished
Failed: "sh -c 'cd /my_app/server/current; RAILS_ENV=production script/delayed_job -n 3 restart'" on myserevr

这是一个Rails 3应用程序(v3.0.3)

解决方法

看到同样的问题.

原来我缺少〜/ apps / application_name / shared / pids目录.

最后创建它使得这个问题消失了.

不需要设置自定义dj_pids目录.

原文链接:https://www.f2er.com/ruby/266151.html

猜你在找的Ruby相关文章