Reputation: 549
I'm trying to get deploy a simple django app, and have successfully pushed my git repository to Heroku. However, when I attempt to run:
heroku ps:scale web=1
I get the following error
Scaling dynos... failed
! Couldn't find that formation.
Any thoughts as to what the problem might be? The contents of the Procfile (below) are correct to the best of my knowledge.
web: gunicorn my_app_name.wsgi
Upvotes: 34
Views: 19135
Reputation: 1
I had a similar problem and tried the following:
At the end of the day just realized that my Procfile was in my app directory. It should be on the root/project directory.
Upvotes: 0
Reputation: 4220
I got the same problme,
1) I also configured ProcFile but the problem still available
So used this
Remove the existing buildpacks with heroku buildpacks:clear and add them again in the right order using the heroku buildpacks:add with the --index option, making sure that the language buildpack is the last in the list
git commit --allow-empty -m "Adjust buildpacks on Heroku"
git push heroku master
Problem solved
Upvotes: 0
Reputation: 3559
When pushing to Heroku you must come up with something like shown in the Picture. If not your procfile has an Error. The Procfile looks like this for my Flask app
web: gunicorn app:app
Upvotes: 1
Reputation: 71
I had the same problem because I missed git add
and git commit
the file named Procfile .
You should try to use the command git status
and review whether the Procfile
is included.
Upvotes: 1
Reputation: 2515
I faced a similar issue while working on windows
(haven't tested on other operating systems)and this worked fine for me.
Initially, I have created a file name procfile
and pushed it to heroku. But, heroku expects the Procfile
declaration. It is case sensitive
. Hence, we should be careful while typing the filename also
.
Even after changing the name to Procfile
git didnt notice changes(maybe git is case-insensitive just like windows). Hence, I had to delete the file completly and had to create a new one with Procfile
as the name of the file.
Upvotes: 1
Reputation: 1
In my php project I can use
$ heroku ps:scale web=1
at the heroku directory "php-getting-started" (https://devcenter.heroku.com/articles/getting-started-with-php#prepare-the-app).
So I'm try to do this in my original application, so I tried to do again in Heroku Repository and it's work.
(sorry about the english, hehe)
Upvotes: 0
Reputation: 894
To add yet another reason this can happen, my Procfile
contained
web:gunicorn
but it should be:
web: gunicorn
As far as I can tell from all of these answers, if you run into this problem, it is very likely related to Procfile
.
Upvotes: 12
Reputation: 619
To state the obvious: another way to encounter this issue is if you're working on a new app, and you try running heroku ps:scale web=1
before you've actually done a git push heroku master
. There is no Procfile
on the Heroku server in that case, because there aren't any files at all. :D
Upvotes: 19
Reputation: 281
for those interested, I had the same problem to add a worker. to do so you need to add this line to your procfile : worker: python worker.py
Upvotes: 7
Reputation: 1400
For others experiencing this same issue, make sure Procfile is not ignored in git.
Delete your Procfile. Then git status
. If don't see anything mentioning Procfile, you need to find remove the entry from local or global .gitignore.
Upvotes: 2
Reputation: 549
Ensure that your Procfile has no extension.
To create a file with no extension on Windows, you can use the command notepad Procfile.
from the command line.
Upvotes: 13