I am having the same problem like Rails custom environment Resque.enqueue does not create jobs , but the solution there doesn't work for me.

I'm using Resque for a couple of asynchronous jobs. It works just fine for the staging environment, but for some reason it stopped working on development environment.

For example, if I run the following:

$ rails c development

> Resque.enqueue(MyLovelyJob, 1)

Nothing is enqueued. I check Resque using resque-web

If I run it on staging - it works just fine.

$ rails c staging

> Resque.enqueue(MyLovelyJob, 1)

I have tried to duplicate the 2 environment, and they seem to use absolutely the same configurations (database.yml , config/environment , etc.), but development is still not working.

If I do

 > Resque.enqueue(UpdateInstancesData, 2)
 > => true
 
 > Resque.info
 > => {
 >       :pending => 0,
 >     :processed => 0,
 >        :queues => 0,
 >       :workers => 1,
 >       :working => 0,
 >        :failed => 0,
 >       :servers => [
 >       [0] "redis://127.0.0.1:6379/0"
 >   ],
 >   :environment => "development"
 > }

Any suggestions where to look in order to debug this?

I am running the application via foreman. My Procfile looks like:

faye: rackup faye.ru -s thin -E production

worker1: bundle exec rake resque:work QUEUE=* VERBOSE=1

worker2: bundle exec rake resque:work QUEUE=* VERBOSE=1

clock: bundle exec rake resque:scheduler VERBOSE=1

web: bundle exec rails s


For staging, as mentioned, everything works and the log from fore

Edit
Report