我希望在Heroku上部署一个非常基础的Django应用程序。我按照说明操作,但浏览器仍然显示Heroku错误页面,Heroku日志显示:
bash: gunicorn: command not found
我在我的 requirements.txt 中加入了 gunicorn,按照文档的指示配置了 wsgi.py 和 Procfile。还有什么可以尝试的吗?
编辑:我也试着在 Heroku 上手动安装 gunicorn(
heroku run pip install gunicorn
),这个过程很顺利,所以我很确定已经安装了 gunicorn。为什么 Heroku 找不到它呢?编辑2:看起来我可以手动安装 gunicorn(
heroku run bash
然后 pip install gunicorn
):~ $ gunicorn
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.
但是当我注销并重新登录到Bash时,会出现以下情况:
~ $ gunicorn
bash: gunicorn: command not found
Heroku似乎安装了gunicorn,但随后又将其丢弃。这是怎么回事?