Delayed Job suddenly not starting in production
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': 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 ` ' 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 ` '
The fix is simple, add:
gem "daemons"
To your Gemfile, bundle install and redeploy.
Enjoy.
Popular Articles by Our Team
Our expert team of designers and developers love what the do and enjoy sharing their knowledge with the world.
-
The Benefits of Ruby on Rails
-
Heroku Forcing Password Resets as GitHub Investigation Continues
-
How to Maximise your ROI with a Custom Application Built in Sa...
We Hire Only the Best
reinteractive is Australia’s largest dedicated Ruby on Rails development company. We don’t cut corners and we know what we are doing.
We are an organisation made up of amazing individuals and we take pride in our team. We are 100% remote work enabling us to choose the best talent no matter which part of the country they live in. reinteractive is dedicated to making it a great place for any developer to work.
Free Community Workshops
We created the Ruby on Rails InstallFest and Ruby on Rails Development Hub to help introduce new people to software development and to help existing developers hone their skills. These workshops provide invaluable mentorship to train developers, addressing key skills shortages in the industry. Software development is a great career choice for all ages and these events help you get started and skilled up.