I am trying to deploy a test app to Heroku --stack cedar but every time I do my Procfile is being ignored.
It should be saying this:
Procfile declare
I had this error and tried all the solutions above but they did not work. Turns out that I had created the git repository in the root of the virtual environment. Which seems reckless but hey...
So if you have tried all the solutions and they don't work check where you created your repository and make sure it is in the root of your project source code and not anywhere else.
Make sure your Procfile does not have any extension.And if it has any you have to rename that file to Procfile without any extension and commit and check out the master
this problem is mainly caused by the create Procfile command when it is run from the command prompt or terminal. I recommend you to create the Procfile manually.
If you are using Visual Studio code then, click on the pipfile and then on the upper side click the create new file
button and enter the name of the file as Procfile
.
Before doing this delete previous Procfile and also use the command git rm procfile -f
in command prompt in your active virtual environment.
if you are using any other IDE then open notepad and enter this line in it
web: gunicorn mb_project.wsgi --log-file
-
after that save it as Procfile and put this file below your pipfile.
here is the link of my files https://github.com/YashMarmat/message-board-app.git
Make sure you don't give any extension to Procfile. I did and got similar error. Also check syntax. For e.g:
web : sh setup.sh should be
web: sh setup.sh
The space between the Record name and the contents seems to be important:
Use:
web: python manage.py runserver
and not
web:python manage.py runserver
I had the same problem and I just now I found what was wrong. I first accidently called the file ProcFile
instead of Procfile
. Simply renaming that file did not get picked up by git. I had to do a git rm ProcFile -f
first and then add a new (correctly named) Procfile
. After that, it got pushed correctly by git and got picked up correctly by Heroku.