I'm creating a Rails app with Rails 3.1.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
Got:
有:
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>
13 个解决方案
#1
155
I had a similar problem, but with Django (incorrectly named "requirements.txt"). I think to generalize the other answers here, when you get this error it's because Heroku is missing some key file that it uses to identify your app (and its type).
我也遇到过类似的问题,但是Django(不正确地命名为“requirements.txt”)。我想在这里归纳一下其他的答案,当你得到这个错误的时候,因为Heroku丢失了一些用来识别你的应用(和它的类型)的关键文件。
- php: index.php
- php:index . php
- python: requirements.txt
- python:让
- ruby: Gemfile # note the capitalization
- ruby: Gemfile #注意大小写。
- node: package.json
- 节点:package.json
#2
48
The problem was that my "Gemfile" was named "gemfile"
问题是我的Gemfile被命名为Gemfile
#3
45
I ran into this error message, but my problem was that my rails app was not in the root directory of my git repo. After I moved the files into the root dir, everything worked.
我遇到了这个错误消息,但我的问题是我的rails应用程序不在我的git repo的根目录中。在我将文件移动到根目录之后,一切都工作了。
#4
26
Heroku detects a supported app by looking for specific project files. To find the requirements for your language, start here.
Heroku通过查找特定的项目文件来检测受支持的应用程序。为了找到你的语言的要求,从这里开始。
- For Node.js, you need a
package.json
. - 为节点。js,你需要一个package.json。
- For Python applications you need a
requirements.txt
. - 对于Python应用程序,您需要一个requirements.txt。
- etc.
- 等。
#5
22
Not associated with a new app, but... I ran into this same error message after installing a custom BUILDPACK on heroku and then forgetting about it. The next time I went to deploy to heroku I saw:
没有与新应用程序相关,但是……我在heroku上安装了一个定制的BUILDPACK之后,就遇到了同样的错误消息,然后又忘记了。下次我去heroku部署的时候,我看到:
-----> Fetching custom git buildpack... done
! Push rejected, no Cedar-supported app detected
The fix was to check:
解决办法是检查:
heroku config
And, there, I found a Var called BUILDPACK_URL
which I had to unset with:
在那里,我找到了一个名为BUILDPACK_URL的Var,我必须把它解出来:
heroku config:unset BUILDPACK_URL
... and voila!
…瞧!
#6
12
Another cause: I was pushing master, while working on a non-master branch. My master branch didn't have requirements.txt.
另一个原因是:我在做一个非master的分支时,正在推master。我的主枝没有要求。
I didn't want to push from master, but heroku only pays attention to the master branch. The solution was to push my local branch to heroku's master branch:
我不想从师傅那里推,但是heroku只关注master branch。解决办法是把我在当地的分支推到heroku的主分支:
git push heroku local_branch:master
#7
7
Another cause of this error for Rails apps: we had this deploy error occur when we hadn't removed a git merge conflict from our Gemfile.lock file.
Rails应用程序出现这种错误的另一个原因是:我们在没有从Gemfile中删除git合并冲突时发生了这种部署错误。锁文件。
#8
3
I had the same issue. "Gemfile" was included in ".gitignore" and has therefore not been part of the deployment. Heroku requires Gemfile for Rails projects.
我也有同样的问题。“Gemfile”被包括进去了。因此,gitignore并不是部署的一部分。Heroku需要Gemfile用于Rails项目。
#9
3
I fixed this by making a superficial change to my Gemfile and recommitting. For some reason it wasn't included in my last commit.
我对Gemfile做了一个表面上的修改,然后重新提交。由于某种原因,它没有包括在我的最后一次承诺中。
#10
3
I met the same problem here.
My check as follow:
1. Make sure "foreman start" works well locally.
2. Make sure only one new app create on your heroku account.
Hope it help.
我在这里遇到了同样的问题。我的支票如下:确保“领班开始”在当地运作良好。2。确保在你的heroku账户上只创建一个新应用。希望它帮助。
#11
3
I was following the RailsTutorial.org steps and this error showed up. None of the answers on this post worked. Then I saw this comment that led to this answer which was the only thing that worked for me so that might solve other people's problems with the tutorial as well.
我遵循RailsTutorial.org的步骤,出现了这个错误。这篇文章的答案都不奏效。然后我看到了这条评论,它引出了这个答案,这是唯一对我有用的东西,这样也可以解决其他人在教程中遇到的问题。
#12
3
When this problem appears with the project based on static files (only html, css and js) it is recommended to follow this guidlines: https://discussion.heroku.com/t/push-rejected-no-cedar-supported-app-detected/640/3
当这个问题出现在基于静态文件的项目(只有html、css和js)时,建议遵循以下的指导原则:https://discussion.heroku.com/t/pushrejected - uncedar- support -detected/640/3。
#13
2
I also had the problem with django based app. Everything seemed to be ok: file names and other settings.
我还遇到了django应用程序的问题。一切似乎都还好:文件名和其他设置。
The problem was that in heroku console there was a BUILDPACK_URL
setting defined for node.js
- thus django application was rejected.
问题是在heroku控制台有一个为node定义的BUILDPACK_URL设置。因此,django应用程序被拒绝了。
#1
155
I had a similar problem, but with Django (incorrectly named "requirements.txt"). I think to generalize the other answers here, when you get this error it's because Heroku is missing some key file that it uses to identify your app (and its type).
我也遇到过类似的问题,但是Django(不正确地命名为“requirements.txt”)。我想在这里归纳一下其他的答案,当你得到这个错误的时候,因为Heroku丢失了一些用来识别你的应用(和它的类型)的关键文件。
- php: index.php
- php:index . php
- python: requirements.txt
- python:让
- ruby: Gemfile # note the capitalization
- ruby: Gemfile #注意大小写。
- node: package.json
- 节点:package.json
#2
48
The problem was that my "Gemfile" was named "gemfile"
问题是我的Gemfile被命名为Gemfile
#3
45
I ran into this error message, but my problem was that my rails app was not in the root directory of my git repo. After I moved the files into the root dir, everything worked.
我遇到了这个错误消息,但我的问题是我的rails应用程序不在我的git repo的根目录中。在我将文件移动到根目录之后,一切都工作了。
#4
26
Heroku detects a supported app by looking for specific project files. To find the requirements for your language, start here.
Heroku通过查找特定的项目文件来检测受支持的应用程序。为了找到你的语言的要求,从这里开始。
- For Node.js, you need a
package.json
. - 为节点。js,你需要一个package.json。
- For Python applications you need a
requirements.txt
. - 对于Python应用程序,您需要一个requirements.txt。
- etc.
- 等。
#5
22
Not associated with a new app, but... I ran into this same error message after installing a custom BUILDPACK on heroku and then forgetting about it. The next time I went to deploy to heroku I saw:
没有与新应用程序相关,但是……我在heroku上安装了一个定制的BUILDPACK之后,就遇到了同样的错误消息,然后又忘记了。下次我去heroku部署的时候,我看到:
-----> Fetching custom git buildpack... done
! Push rejected, no Cedar-supported app detected
The fix was to check:
解决办法是检查:
heroku config
And, there, I found a Var called BUILDPACK_URL
which I had to unset with:
在那里,我找到了一个名为BUILDPACK_URL的Var,我必须把它解出来:
heroku config:unset BUILDPACK_URL
... and voila!
…瞧!
#6
12
Another cause: I was pushing master, while working on a non-master branch. My master branch didn't have requirements.txt.
另一个原因是:我在做一个非master的分支时,正在推master。我的主枝没有要求。
I didn't want to push from master, but heroku only pays attention to the master branch. The solution was to push my local branch to heroku's master branch:
我不想从师傅那里推,但是heroku只关注master branch。解决办法是把我在当地的分支推到heroku的主分支:
git push heroku local_branch:master
#7
7
Another cause of this error for Rails apps: we had this deploy error occur when we hadn't removed a git merge conflict from our Gemfile.lock file.
Rails应用程序出现这种错误的另一个原因是:我们在没有从Gemfile中删除git合并冲突时发生了这种部署错误。锁文件。
#8
3
I had the same issue. "Gemfile" was included in ".gitignore" and has therefore not been part of the deployment. Heroku requires Gemfile for Rails projects.
我也有同样的问题。“Gemfile”被包括进去了。因此,gitignore并不是部署的一部分。Heroku需要Gemfile用于Rails项目。
#9
3
I fixed this by making a superficial change to my Gemfile and recommitting. For some reason it wasn't included in my last commit.
我对Gemfile做了一个表面上的修改,然后重新提交。由于某种原因,它没有包括在我的最后一次承诺中。
#10
3
I met the same problem here.
My check as follow:
1. Make sure "foreman start" works well locally.
2. Make sure only one new app create on your heroku account.
Hope it help.
我在这里遇到了同样的问题。我的支票如下:确保“领班开始”在当地运作良好。2。确保在你的heroku账户上只创建一个新应用。希望它帮助。
#11
3
I was following the RailsTutorial.org steps and this error showed up. None of the answers on this post worked. Then I saw this comment that led to this answer which was the only thing that worked for me so that might solve other people's problems with the tutorial as well.
我遵循RailsTutorial.org的步骤,出现了这个错误。这篇文章的答案都不奏效。然后我看到了这条评论,它引出了这个答案,这是唯一对我有用的东西,这样也可以解决其他人在教程中遇到的问题。
#12
3
When this problem appears with the project based on static files (only html, css and js) it is recommended to follow this guidlines: https://discussion.heroku.com/t/push-rejected-no-cedar-supported-app-detected/640/3
当这个问题出现在基于静态文件的项目(只有html、css和js)时,建议遵循以下的指导原则:https://discussion.heroku.com/t/pushrejected - uncedar- support -detected/640/3。
#13
2
I also had the problem with django based app. Everything seemed to be ok: file names and other settings.
我还遇到了django应用程序的问题。一切似乎都还好:文件名和其他设置。
The problem was that in heroku console there was a BUILDPACK_URL
setting defined for node.js
- thus django application was rejected.
问题是在heroku控制台有一个为node定义的BUILDPACK_URL设置。因此,django应用程序被拒绝了。