Heroku推送拒绝,没有检测到Cedar支持的应用程序

WHI*_*LOR 110 ruby-on-rails heroku ruby-on-rails-3

我正在使用Rails 3.1.3创建一个Rails应用程序:

git init
git remote add heroku <my heroku repo>
git add .
git commit -a -m "First commit"
git push heroku master
Run Code Online (Sandbox Code Playgroud)

拿到:

Counting objects: 102, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (102/102), 315.47 KiB, done.
Total 102 (delta 3), reused 0 (delta 0)

**-----> Heroku receiving push
 !     Heroku push rejected, no Cedar-supported app detected**

To git@heroku.com:electric-dusk-3217.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to <my heroku rep>
Run Code Online (Sandbox Code Playgroud)

JnB*_*ymn 155

我有类似的问题,但使用Django(错误地命名为"requirements.txt").我想在这里概括其他答案,当你得到这个错误时,因为Heroku缺少一些用于识别你的应用程序(及其类型)的密钥文件.

  • php:index.php
  • python:requirements.txt
  • ruby:Gemfile #note大写
  • node:package.json

  • 在这里找到了这个问题的另一个答案(重新初始化git repo):http://stackoverflow.com/questions/9305370/rails-3-2-heroku-push-rejected-no-cedar-supported-app-detected (6认同)

WHI*_*LOR 48

问题是我的"Gemfile"被命名为"gemfile"

  • 什么是"Gemfile"?我有一个HTML游戏,我想在heroku推送它.我得到同样的错误 (2认同)

nch*_*rro 45

我遇到了这个错误消息,但我的问题是我的rails应用程序不在我的git仓库的根目录中.将文件移动到根目录后,一切正常.

  • 这似乎是一个糟糕的解决方案.有没有一种正确的方法来推动应用程序在子目录中? (3认同)

Pat*_*her 26

Heroku通过查找特定的项目文件来检测支持的应用程序.要查找您的语言要求,请从此处开始.


pdo*_*obb 22

没有与新的应用程序相关联,但是...在heroku上安装自定义BUILDPACK之后遇到了同样的错误消息,然后忘记了它.下次我去部署到heroku时,我看到:

-----> Fetching custom git buildpack... done

 !     Push rejected, no Cedar-supported app detected
Run Code Online (Sandbox Code Playgroud)

修复是检查:

 heroku config
Run Code Online (Sandbox Code Playgroud)

而且,在那里,我找到了一个BUILDPACK_URL我不得不解雇的Var :

heroku config:unset BUILDPACK_URL
Run Code Online (Sandbox Code Playgroud)

......瞧!


jap*_*hyr 12

另一个原因:我正在推动大师,同时在一个非主分支上工作.我的主分支没有requirements.txt.

我不想从主人那里推,但是heroku只关注主分支.解决方案是将我的本地分支推送到heroku的主分支:

git push heroku local_branch:master
Run Code Online (Sandbox Code Playgroud)

  • 你是我的英雄 !我花了好几个小时试着找到这个> < (2认同)

Jam*_*ath 7

Rails应用程序出现此错误的另一个原因:当我们没有从Gemfile.lock文件中删除git合并冲突时,我们发生了此部署错误.