【问题标题】:Why does push fail when upgrading to Cedar-14为什么升级到 Cedar-14 时推送失败
【发布时间】:2016-01-05 03:05:33
【问题描述】:

我正在尝试使用 Heroku 文档中的以下命令将 Heroku 上的几个 Django 应用程序升级到 Cedar-14:

➜  project-name git:(master) ✗ heroku stack:set cedar-14
Stack set. Next release on project-name will use cedar-14.
Run `git push heroku master` to create a new release on cedar-14.

➜  project-name git:(master) ✗ git commit --allow-empty -m "Upgrading to Cedar-14"
[master 3710f78] Upgrading to Cedar-14

➜  project-name git:(master) ✗ git push heroku master
Counting objects: 1, done.
Writing objects: 100% (1/1), 191 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing runtime (python-2.6.9)
remote: -----> Installing dependencies with pip
remote: /app/tmp/buildpacks/python/bin/steps/pip-install: line 7: /app/.heroku/python/bin/pip: No such file or directory
remote: 
remote:  !     Push rejected, failed to compile Python app
remote: 
remote: Verifying deploy...
remote: 
remote: ! Push rejected to project-name.
remote: 
To https://git.heroku.com/project-name.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project-name.git'

看来失败与pip有关。我想知道我是否缺少某种要求?这是我的 requirements.txt 的内容:

Django==1.4.3
PyYAML==3.10
South==0.7.6
astroid==1.0.1
boto==2.27.0
coverage==3.6
dj-database-url==0.2.1
django-adminplus==0.1.7
django-fields==0.2.0
django-grappelli==2.4.0
django-jenkins==0.14.0
django-storages==1.1.5
-e git+https://github.com/toastdriven/django-tastypie.git@eee008f3eef0f756b32635e7b74c1c9732cf593c#egg=django_tastypie-dev
feedparser==5.1.2
gunicorn==0.14.6
logilab-astng==0.24.3
logilab-common==0.59.1
mimeparse==0.1.3
newrelic==2.8.0.7
psycopg2==2.4.5
pycrypto==2.6.1
pycurl==7.19.0
pylint==0.28.0
python-dateutil==1.5
raven==4.0.3
requests==1.0.4
six==1.6.1
stripe==1.7.7
wsgiref==0.1.2

【问题讨论】:

    标签: django heroku pip cedar


    【解决方案1】:

    (这个问题的答案实际上来自用户 Kenneth Reitz,在 Heroku 支持频道上得到了回答。谢谢!)

    由于这似乎不是与应用程序代码相关的问题,Heroku 团队建议我使用此工具清除构建缓存:https://github.com/heroku/heroku-repo

    我运行的命令是:

    heroku plugins:install heroku-repo
    heroku repo:purge_cache -a project-name
    

    这似乎成功了!

    【讨论】:

    • 非常感谢,plugins:install 很关键(看到较早的答案但缺少插件)
    猜你喜欢
    • 2016-03-31
    • 1970-01-01
    • 1970-01-01
    • 2010-12-05
    • 2013-02-28
    • 1970-01-01
    • 2018-04-07
    • 2022-09-23
    • 2017-08-17
    相关资源
    最近更新 更多