Heroku本地不工作?

时间:2016-04-05 07:18:10

标签: python heroku terminal

我尝试使用heroku local在本地部署我的python应用程序,但我一直收到以下输出:

(env) iMac:myproject Me$  heroku local
[WARN] No ENV file found
[OKAY] Trimming display Output to 61 Columns
12:15:08 AM web.1 |  [2016-04-05 00:15:08 -0700] [47311] [INFO] Starting gunicorn …
12:15:08 AM web.1 |  [2016-04-05 00:15:08 -0700] [47311] [ERROR] Connection in use…
12:15:08 AM web.1 |  [2016-04-05 00:15:08 -0700] [47311] [ERROR] Retrying in 1 sec…
12:15:09 AM web.1 |  [2016-04-05 00:15:09 -0700] [47311] [ERROR] Connection in use…
12:15:09 AM web.1 |  [2016-04-05 00:15:09 -0700] [47311] [ERROR] Retrying in 1 sec…
12:15:10 AM web.1 |  [2016-04-05 00:15:10 -0700] [47311] [ERROR] Connection in use…
12:15:10 AM web.1 |  [2016-04-05 00:15:10 -0700] [47311] [ERROR] Retrying in 1 sec…
12:15:11 AM web.1 |  [2016-04-05 00:15:11 -0700] [47311] [ERROR] Connection in use…
12:15:11 AM web.1 |  [2016-04-05 00:15:11 -0700] [47311] [ERROR] Retrying in 1 sec…
12:15:12 AM web.1 |  [2016-04-05 00:15:12 -0700] [47311] [ERROR] Connection in use…
12:15:12 AM web.1 |  [2016-04-05 00:15:12 -0700] [47311] [ERROR] Retrying in 1 sec…
12:15:13 AM web.1 |  [2016-04-05 00:15:13 -0700] [47311] [ERROR] Can't connect to …
[DONE] Killing all processes with signal  null
12:15:13 AM web.1 Exited Abnormally
(env) iMac:myproject Me$ 

env文件夹位于应用程序中。

enter image description here

2 个答案:

答案 0 :(得分:1)

问题不在于环境文件。

从中可以看出:
[WARN] No ENV file found
这是警告。

我不确定这里有什么问题。日志会说什么吗?

试试这个(我每次都必须像这样运行我的本地服务器):

heroku local web -f Procfile

答案 1 :(得分:0)

env是名称为.env的文件(不是文件夹)。在https://devcenter.heroku.com/articles/heroku-local#add-a-config-var-to-your-env-file

了解更多信息