I've updated a couple of gems and what not, namely upgraded rails to version 3.0.7
The project has quite a few delayed_jobs in it, however now when I come to start the jobs in the terminal with 开发者_运维百科the command:
rake jobs:work
I get an error message saying:
undefined method `task' for #<MyAppName::Application:0x10350ab78>
The rake file current has the follwing in it, in realation to delayed jobs I think:
MyAppName::Application.load_tasks
I was wondering if anyone new how to fix this problem and get delayed jobs running again.
Also as far as I can tell there is no problem with adding the jobs to the db, the problem is purly with starting the tasks on my local machen via the terminal.
Thanks!
This fix worked for me
Undefined method 'task' using Rake 0.9.0
Did you upgrade rake? Apparently Rake 0.9 broke Rails 3.0.7:
Rake 0.9, which was released yesterday, broke Rails (and others). While we wait for a fix, you'll want gem 'rake', '0.8.7' in your Gemfile. - David Heinemeier Hansson
Have you tried updating to the latest delayed_job plugin? run bundle install
? what happens if you run rails script/delayed_job start
?
精彩评论