ruby-on-rails – 使用Capistrano和Rails配置延迟作业4

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 使用Capistrano和Rails配置延迟作业4前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图让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"
原文链接:https://www.f2er.com/ruby/271210.html

猜你在找的Ruby相关文章