Rails - 更新 Rails 后延迟作业失败?

发布于 2024-11-09 01:45:09 字数 444 浏览 2 评论 0原文

我已经更新了一些gems,即将rails升级到版本3.0.7

该项目中有相当多的delayed_jobs,但是现在当我用命令在终端中启动作业时:

rake jobs:work

我收到一个错误消息说:

undefined method `task' for #<MyAppName::Application:0x10350ab78>

当前的 rake 文件包含以下内容,与延迟的作业有关,我认为:

MyAppName::Application.load_tasks

我想知道是否有新人如何解决此问题并使延迟的作业再次运行。

据我所知,将作业添加到数据库没有问题,问题纯粹在于通过终端在本地机器上启动任务。

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

埋情葬爱 2024-11-16 01:45:09

你升级了耙子吗?显然 Rake 0.9 破坏了 Rails 3.0.7:

Rake 0.9 已发布
昨天,破坏了 Rails(和其他)。
当我们等待修复时,您会想要
Gemfile 中的 gem 'rake', '0.8.7'。 - 大卫·海涅迈尔·汉森

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

此刻的回忆 2024-11-16 01:45:09

您是否尝试过更新到最新的delayed_job插件?运行捆绑安装?如果运行 rails script/delayed_job start 会发生什么?

Have you tried updating to the latest delayed_job plugin? run bundle install? what happens if you run rails script/delayed_job start?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文