我無法使用卡西斯拉諾的配方啓動延遲的工作過程。這是我得到的錯誤。延遲的工作不會開始使用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 app(v3.0.3)
同樣在這裏。使用卡皮斯特拉諾鮮爲人知的'shared_children'設置時發生。通過共享中的symlinking解決:'ln -s tmp/pids'。 – Zubin 2013-01-02 23:22:16
非常有用的答案解決了我的問題。非常感謝! – wallerjake 2014-05-12 02:05:08
@Zubin,@wallerjake和@PhilT:我想我有同樣的符號鏈接問題: 'current/tmp/pids - >/var/www/apps/production.myserver.de/shared/pids' 必須去'/var/www/apps/production.myserver.de/shared'-目錄並輸入'ln -s tmp/pids'命令?我在Unix命令中並不確定:( 謝謝! – levitas111 2014-06-25 11:23:30