Django Heroku-工头启动失败,没有这样的选项:--noinput;
嗨,我很难让foreman在本地启动我的应用程序。。。虽然应用程序在我使用Django Heroku-工头启动失败,没有这样的选项:--noinput;,django,heroku,foreman,Django,Heroku,Foreman,嗨,我很难让foreman在本地启动我的应用程序。。。虽然应用程序在我使用python manage.py runserver时运行 当我使用命令时 foreman start 我得到这个输出: (venv)MacBook-Pro:staging macbook$ foreman start 12:25:08 web.1 | started with pid 15160 12:25:09 web.1 | Usage: manage.py collectstatic [optio
python manage.py runserver时运行
当我使用命令时
foreman start
我得到这个输出:
(venv)MacBook-Pro:staging macbook$ foreman start
12:25:08 web.1 | started with pid 15160
12:25:09 web.1 | Usage: manage.py collectstatic [options]
12:25:09 web.1 |
12:25:09 web.1 | Collect static files in a single location.
12:25:09 web.1 |
12:25:09 web.1 | manage.py: error: no such option: --noinput;
12:25:09 web.1 | process terminated
12:25:09 system | sending SIGTERM to all processes
这是我的procfile(与此问题有关)
当推到Heroku时,这一切都很好。。。只是不是在我的机器上
当我拔出collecstatic零件时,它与gunicorn配合良好,如下所示:
web: gunicorn wsgi -b 0.0.0.0:$PORT
因此,它似乎是python manage.py collecstatic——但它不喜欢。。。但是,如果我在collecstatic目录中手动运行该部分,则可以正常工作
这是我的个人资料
# {{{
# Node Completion - Auto-generated, do not touch.
shopt -s progcomp
for f in $(command ls ~/.node-completion); do
f="$HOME/.node-completion/$f"
test -f "$f" && . "$f"
done
# }}}
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
export WORKON_HOME=~/Envs
我的配置也是运行VirtualNVRapper,并通过Brew和PIP安装所有这些 从站点下载而不是通过命令行升级重新安装了Heroku Toolbelt…现在foreman可以工作了。您在本地运行的是哪个版本的Django?另外,为什么要在本地环境上运行collectstatic?你不是在本地提供静态资产吗?Django 1.4.1-我刚刚从git中删除了repo,作为Im的第二合作者,所以我还不确定所有的设置和procfile…只是想让它在本地工作,这就是我到目前为止遇到的问题。奇怪。您是否尝试过更新Heroku工具带?手动的
python manage.py collectstatic--noinput
?您的shell似乎不喜欢带有以下的--noinput
标志代码>。你知道为什么会这样吗?
# {{{
# Node Completion - Auto-generated, do not touch.
shopt -s progcomp
for f in $(command ls ~/.node-completion); do
f="$HOME/.node-completion/$f"
test -f "$f" && . "$f"
done
# }}}
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
export WORKON_HOME=~/Envs