【发布时间】:2018-08-27 13:54:58
【问题描述】:
我正在尝试使用 postgresql 在 heroku 上运行 django 应用程序,但我得到了 当我转到我的应用程序网址时,我会检查 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
我有一个带有 gunicorn 的 requirements.txt,安装了 heroku python buildpack
我尝试使用远程安装 gunicorn
heroku run pip install -r requirements.txt
但我明白了
› Error: remote requirements.txt not found in git remotes
【问题讨论】:
-
检查
requirements.txt是否像manage.py一样在根文件夹中。 -
还要检查您是否将 gunicorn 添加到已安装的应用程序中。我曾经犯过这个错误。
-
它在根 floydya 中,我不知道这是必要的迪士尼
-
是否以正确的方式将“gunicorn”添加到 settings.py 安装的应用程序中?
-
好的,然后我也遇到了需要允许 heroku 允许主机的错误,但之后它终于起作用了!