开发者

delayed_job and rails 3 not loading jobs

I am trying to start the delayed_job daemon but it's returning the following error.

$ rake jobs:work

*** Starting job worker host:Kelvin-Pompeys-MacBo开发者_高级运维ok-Pro.local pid:4712 rake aborted! Job failed to load: invalid subclass. Try to manually require the required file.

After a bit of Googling I found the link below which suggests that I require my models in an initializer but I am new to ruby and rails and I don't quite know how to go about implementing this. Any assistance appreciated.

http://github.com/collectiveidea/delayed_job/issues/issue/65


Create config/initializers/delayed_job.rb. In this file just require anything you need to de-serialize. Like if your job class is MyJob and it is located in app/models/my_job.rb:

require 'my_job'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜