Capistrano & delayed_job With Rails 4

If you’ve tried deploying your Rails 4 app using Capistrano, and you happen to also be using the delayed_job gem, you may have encountered a problem.

bash: script/delayed_job: No such file or directory

The solution is actually quite simple. Rails 4 uses the bin directory in place of the script directory, so add this to your deploy.rb file:

set :delayed_job_command, "bin/delayed_job"