[英]Heroku Django webapp getting error logs say gunicorn command not found but it is there
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我正在尝试使用 postgresql 在 heroku 上运行一个 django 应用程序,但是当我转到我的应用程序 url 时,我正在检查 heroku 日志 --tail 并查看
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 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
我有一个带有 gunicorn 的 requirements.txt,安装了 heroku python buildpack
i try maybe installing gunicorn remotely with heroku run pip install -r requirements.txt
我尝试使用
heroku run pip install -r requirements.txt
远程安装 gunicorn
but i get › Error: remote requirements.txt not found in git remotes
但我得到
› 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.我也在使用 Django,在我将更新推送到 Heroku 几分钟后,在
heroku logs --tail
。 Prior to the push to Heroku everything worked just fine.在推送到 Heroku 之前,一切都运行良好。
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.所以我进入了应用程序在 Heroku 中的
Activity Feed
,找到了我知道有效的版本并单击了Roll back to here
链接。
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.当这不起作用时,根据另一个用户的建议(我现在似乎找不到他的评论),我从
requirements.txt
中删除了所有包,然后将其推送到 Heroku,以便所有包都将在应用程序。 Then I added back all packages to the requirements.txt
and pushed it to Heroku.然后我将所有包添加回
requirements.txt
并将其推送到 Heroku。 Now it works.现在可以了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.