开发者

Why am I getting a resource not found error when setting workers on heroku?

This is a snippet of my code trying to turn on the number of workers on my 开发者_如何转开发heroku instances:

heroku = Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASS'])
puts "created the client"
heroku.set_workers(ENV['HEROKU_APP'], 1)
puts "set workers to 1"

I stored all the values, HEROKU_USER, HEROKU_PASS, and HEROKU_APP as a heroku config:add variable

But when I run this cron task, I end up with an error:

"Rake Aborted!  Resource Not Found"

What do I need to do? This snippet had worked correctly till I wanted to move the keys out of the repository after changing them and put just into a config var on heroku.


See my answer here: Heroku & Delayed Job - Autoscale Branch - RestClient::ResourceNotFound

Make sure those environment variables exist and are set properly. That's what tripped up the poster of the question I linked above.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜