Bundler with Capistrano doesn't generate a binary for DelayedJob

我与影子孤独终老i 提交于 2019-12-04 05:01:41

I think you need to include the gem "daemons", according to the documentation:

To do so, add gem "daemons" to your Gemfile and make sure you've run rails generate delayed_job.

https://github.com/collectiveidea/delayed_job#running-jobs

I had the same issue. The delayed_job binstub is not generated with bundler but with a rails generator. Prevent the bin directory from being symlinked during capistrano deploy. Change config/deploy.rb from this:

set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

to

set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

Then i regenerated all binstubs locally using bundler

bundle install --binstubs

Now i ran the delayed_job generator

bundle exec rails g delayed_job

Check everything in and deploy again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!