Heroku push rejected, no Cedar-supported app detec

2019-01-03 12:57发布

I'm creating a Rails app with Rails 3.1.3:

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条回答
霸刀☆藐视天下
2楼-- · 2019-01-03 13:20

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.

查看更多
疯言疯语
3楼-- · 2019-01-03 13:23

Another cause: I was pushing master, while working on a non-master branch. My master branch didn't have requirements.txt.

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:

git push heroku local_branch:master
查看更多
神经病院院长
4楼-- · 2019-01-03 13:23

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.

查看更多
贪生不怕死
5楼-- · 2019-01-03 13:27

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

查看更多
贼婆χ
6楼-- · 2019-01-03 13:27

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.

查看更多
Viruses.
7楼-- · 2019-01-03 13:29

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:

-----> 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:

heroku config:unset BUILDPACK_URL

... and voila!

查看更多
登录 后发表回答