Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start delayed job workers in production mode

I was following railscast for delayed job. Things are working perfectly on my machine. How can start delayed_job workers in production mode?

I am using delayed_job gem,(2.1.4)

like image 202
Mohit Jain Avatar asked Jul 25 '11 10:07

Mohit Jain


2 Answers

RAILS_ENV=production script/delayed_job start

For Rails 4

RAILS_ENV=production bin/delayed_job start

Solved my problem.

It may give you an error that tmp directory doesn't exists. Just create one and run previous command again..

like image 157
Mohit Jain Avatar answered Sep 24 '22 16:09

Mohit Jain


You can try to run the following command:

RAILS_ENV=production cd ~/path_to_your_app/current && /usr/local/bin/ruby ./script/delayed_job start

where you should adjust /usr/local/bin/ruby based on your production server ruby configuration.

like image 38
Matteo Alessani Avatar answered Sep 20 '22 16:09

Matteo Alessani