【发布时间】:2015-01-08 06:57:55
【问题描述】:
我正在尝试部署一个简单的 Django 应用程序。我有一个 requirements.txt 文件,其中声明了许多依赖项。当我推送到 heroku 时,它说它正在安装我声明的依赖项:
Downloading/unpacking gunicorn==19.1.1 (from -r requirements.txt (line 9))
Running setup.py (path:/tmp/pip_build_u52128/gunicorn/setup.py) egg_info for package gunicorn
但是,当我运行命令“heroku ps:scale web=1”时(按照 heroku 教程中的建议),我得到以下输出:
Scaling dynos... done, now running web at 1:1X.
当我检查“heroku ps”时,我得到以下输出:
=== web (1X): gunicorn poem_maker.wsgi:application
web.1: crashed 2015/01/08 10:46:14 (~ 3m ago)
查看日志,我看到以下输出:
2015-01-08T06:46:14.481013+00:00 heroku[web.1]: Starting process with command gunicorn poem_maker.wsgi:application
2015-01-08T06:46:15.214361+00:00 app[web.1]: bash: gunicorn: command not found
在我看来,我这样做是正确的——应该找到 gunicorn 命令!
谢谢,
院长
【问题讨论】:
-
你的 Procfile 是什么样的?
-
@DanielRoseman 我的 Procfile 中唯一的一行如下: web: gunicornpoem_maker.wsgi
-
你能试试
bin/gunicorn吗? -
@DanielRoseman 我在我的 Procfile 中将 'gunicorn' 替换为 'bin/gunicorn',得到以下输出:
bash: bin/gunicorn: No such file or directory -
你能分享更多的 pip 安装日志吗?最后总结了安装的内容 - gunicorn 在那里?