Pergunta

Will delayed job work with Rails 4?

Currently, I am upgrading my application to Rails 4 and using

gem "delayed_job", :git => 'git://github.com/collectiveidea/delayed_job.git' 

in gemfile.

when i run rake jobs:work i got error like this

Error while reserving job: undefined method reserve for Delayed::Job:Class

any help on this?

Foi útil?

Solução

add this gem 'delayed_job_active_record' line below gem "delayed_job" to your gem file like this,

gem "delayed_job", :git => 'git://github.com/collectiveidea/delayed_job.git' 
gem 'delayed_job_active_record'

and do

bundle install

then try

bundle exec rake jobs:work

hope it will work.

Outras dicas

Delayed job will work on rails 4. But the delayed_job folder inside the bin folder. So, You can run delayed job by following command

bin/delayed_job start`
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top