问题
I have an app that works perfectly on my local machine and am deploying it now. I have the VPS all set up and it pretty much works, as well. My problem comes from not being able to start delayed_job. I do the "ruby script/delayed_job start RAILS_ENV=production" while SSHd to the app and it returns "delayed_job: process with pid 11547 started." When I look for the process in htop, I can't find it.
So I dug around and read that Monit can keep delayed_job going. I set that up, hoping I could start up the delayed_job that way. There's no delayed_job.pid, though, so I didn't get far. I ended up setting up nginx and mysql in it, though, and would like to finish setting up delayed_job. The lack of delayed_job.pid gets in the way.
When I SSH into the app and run "rake jobs:work RAILS_ENV=production", everything works just fine. So I'm pretty sure the app itself is fine.
I'm using collectiveidea's delayed_job. Thanks for any help.
回答1:
It turns out that there's a problem with the daemons gem. Using the ghazel-daemons fork works perfectly. Now onto setting up Monit.
回答2:
In my case, I just declare that it must use version 1.0.10 of daemons in the Gemfile:
gem "daemons", "= 1.0.10"
Which is the previous version of daemons from 2008.
来源:https://stackoverflow.com/questions/3444736/terminal-says-delayed-job-starting-but-not-doing-anything