Satchel
Satchel

Reputation: 16734

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.

Upvotes: 0

Views: 1822

Answers (1)

tfe
tfe

Reputation: 34992

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.

Upvotes: 1

Related Questions