【问题标题】:Difficulties pushing application to Heroku将应用程序推送到 Heroku 的困难
【发布时间】:2013-03-08 12:58:32
【问题描述】:

我无法将我的 Django 应用程序从 github 推送到 Heroku。我已经同步了 App 目录中的文件。之后我按照this中给出的这个程序进行操作

  1. 克隆你的 git 仓库
  2. 从您的 requirements.txt 中删除 virtualenv==1.8.4
  3. git 添加。
  4. git commit -m "移除 virtualenv 要求
  5. git push heroku master

在第 4 步之前一切正常。在执行第 4 步后,它说

#On Branch master
nothing to commit , working directory clean

当我执行第 5 步时,我遇到了这个错误。我不知道这是什么意思。

$ git push heroku master
Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (16/16), 5.63 KiB, done.
Total 16 (delta 0), reused 0 (delta 0)

 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:tranquil-bastion-1294.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:tranquil-bastion-1294.git'

请指导我该怎么做,因为这是我在 Heroku 上的第一次部署。谢谢。

【问题讨论】:

  • 您是否创建了 Heroku 所需的环境变量?
  • @leonardo 环境变量?
  • 你应该访问heroku中的文档devcenter.heroku.com/articles/django
  • 你还需要一个“Procfile”?,你有吗?
  • 不,但我正在尝试按照您给我的教程逐步进行。我遇到了一些问题。

标签: django heroku github


【解决方案1】:

您的存储库的顶层是否有 requirements.txt 文件?这就是 Heroku 用来确定您的应用程序是否应该使用 Python 构建包的方法。详情:

【讨论】:

    猜你喜欢
    • 2020-01-23
    • 1970-01-01
    • 2010-12-30
    • 2011-02-26
    • 1970-01-01
    • 2021-10-29
    • 2018-12-12
    • 2016-05-12
    • 2015-01-01
    相关资源
    最近更新 更多