Blog

Delayed Job Suddenly not Starting in Production

Team Avatar - Mikel Lindsaar
Mikel Lindsaar
February 17, 2012

We had a client server not want to start up Delayed Job on their server using the script/delayed_job command.

The culprit? DelayedJob no longer requires deamons as a runtime dependency with this commit

Which gives you an error like this:

$ ruby script/delayed_job -i 0 start
/data/app/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.0/lib/delayed/command.rb:4:in `rescue in <top (required)>': You need to add gem 'daemons' to your Gemfile if you wish to use it. (RuntimeError)
	from /data/app/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.0/lib/delayed/command.rb:1:in `<top (required)>'
	from /data/app/shared/bundled_gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
	from /data/app/shared/bundled_gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
	from /data/app/shared/bundled_gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
	from /data/app/shared/bundled_gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
	from /data/app/current/script/delayed_job:4:in `
' </pre> The fix is simple, add: gem "daemons" To your Gemfile, bundle install and redeploy. Enjoy.