我试图让Capistrano使用Rails 4应用程序启动/停止延迟作业.我跟着
instructions here,但它说Rails 3.这就是它现在配置的方式:
deploy.rb:
require 'delayed/recipes' after "deploy:start","delayed_job:start" after "deploy:stop","delayed_job:stop" after "deploy:restart","delayed_job:stop","delayed_job:start"
当我尝试部署时,我尝试执行RAILS_ENV =生产脚本/ delayed_job停止后收到以下错误
sh: script/delayed_job: not found
解决方法
找到了解决方法(设置:delayed_job_command,“bin / delayed_job”)并希望这有助于其他人!
deploy.rb:
require 'delayed/recipes' set :delayed_job_command,"bin/delayed_job" after "deploy:start","delayed_job:start" after "deploy:stop","delayed_job:stop" after "deploy:restart","delayed_job:start"