I am trying to run a django app on heroku with postgresql but i'm getting when i go to my app url i check the heroku logs --tail and see
2018-08-27T10:37:19.086599+00:00 heroku[web.1]: State changed from starting to crashed 2018-08-27T10:37:19.070449+00:00 heroku[web.1]: Process exited with status 127 2018-08-27T10:37:18.986150+00:00 app[web.1]: bash: gunicorn: command not found
i have a requirements.txt with gunicorn, the heroku python buildpack installed
i try maybe installing gunicorn remotely with heroku run pip install -r requirements.txt
but i get › Error: remote requirements.txt not found in git remotes
I'm also working with Django and saw this same exact error in heroku logs --tail
a few minutes after I pushed updated to Heroku. Prior to the push to Heroku everything worked just fine.
To solve this problem, first I made sure that the following files that worked previously remain unchanged with the push:
Since these files remained unchanged, I concluded that something beyond my knowledge was causing issues. So I went into the app's Activity Feed
in Heroku, found the version that I knew worked and clicked on the Roll back to here
link.
When that didn't work, per the recommendation of another user (whose comment I can't seem to find now), I removed all packages from the requirements.txt
then pushed it up to Heroku so that all packages would be uninstalled in the app. Then I added back all packages to the requirements.txt
and pushed it to Heroku. Now it works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.