Heroku error message no Cedar-supported app detected

梦想与她 提交于 2020-01-01 10:13:28

问题


So, I am running into more problems with heroku and this rails tutorial. The rails tutorial I am making had me develop a super basic app. They then had me create a bit bucket account. After this they had me create a Heroku account. Now they are asking me to push my origin master to my heroku host. When I do this, I am getting this error message and I cannot figure it out. Anyone have any hints as to how I could solve this? Thanks so much in advance!

alopex@alopex-TH55-HD:~/work-space$ git push heroku master
Counting objects: 66, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.39 KiB | 0 bytes/s, done.
Total 66 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:  !     Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote:       to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: Building source:
remote: 
remote: 
remote:  !     Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote:       to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to safe-badlands-5004.
remote: 
To https://git.heroku.com/safe-badlands-5004.git
! [remote rejected] master -> master (pre-receive hook declined)

回答1:


You need to cd in to your project directory, as I'm assuming ~/work-space isn't the name of your app.

Do the following: cd path/to/root/of/your/project and try the command again.

UPDATE

Historically, the more major fix for this has been one of two things:

Correctly naming your .buildpacks file (make sure it's not .buildpack)

or

Reinitializing your .git files:

rm -rf .git
git init
git add .
git commit -am "Reinitialize"
heroku create --stack cedar
git push heroku master



回答2:


I GOT IT! OH LORD I GOT IT!

Ahem...


So, Steve and Collin were correct. I did in fact need to be in my project directory so Heroku could sense my Ruby files and proceed accordingly. I goofed up when I pushed my initial app to Bit Bucket. I pushed my app onto Bit Bucket inside of a main directory. This made my app the a subfolder, which in turn made it impossible for Heroku to detect its presence.

The solution was selecting all of my app, click and dragging it to the desktop and deleting the phony main folder. I the proceeded to put my files back into the Bit Bucket repository and add, committed, and pushed it to Bit Bucket.

If this happens to you, make sure that you also drag the hidden folders in your app into your new folder as well, as that could really mess you up.

Thanks everyone!



来源:https://stackoverflow.com/questions/31330587/heroku-error-message-no-cedar-supported-app-detected

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!