简体   繁体   English

在Heroku日志中出现此错误:不知道如何构建任务'jobs:work'

[英]Getting this error in Heroku logs: Don't know how to build task 'jobs:work'

I've been troubleshooting a rails app I pushed to an existing Heroku app. 我一直在对推送到现有Heroku应用程序的Rails应用程序进行故障排除。 Whenever I submit user input from the home page, I receive a 500 error: We're sorry, but something went wrong. 每当我从主页提交用户输入时,都会收到500错误: We're sorry, but something went wrong.

This is what I get back when I run heroku logs : 这是我运行heroku logs时得到的信息:

2014-12-15T22:59:50.824951+00:00 app[worker.1]: rake aborted!
2014-12-15T22:59:50.824977+00:00 app[worker.1]: Don't know how to build task 'jobs:work'

I'm not sure what steps I should take fix this, so any insights would be greatly appreciated! 我不确定应该采取什么步骤来解决此问题,因此任何见解将不胜感激!

This is more of a work-around than a solution: 这不是解决方案,而是解决方法:

Add a (blank) rake task called jobs:work . 添加一个名为jobs:work的(空白)Rake任务。

# lib/tasks/jobs.rake
namespace :jobs do
  task work: :environment do |t|
  end
end

I started getting this error when my Hobby dyno went over the hours allowed per month 当我的爱好测功机超过每月允许的时间时,我开始收到此错误

Run heroku run rake -T|grep jobs and if you get Free app running time quota exhausted then there you have it... 运行heroku run rake -T|grep jobs ,如果您获得了Free app running time quota exhausted那么就可以使用它...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM