2015-07-10 77 views
6

所以,我遇到了更多與heroku和這個rails教程有關的問題。我正在製作的rails教程讓我開發了一個超級基本的應用程序。然後他們讓我創建了一個桶賬戶。在此之後,他們讓我創建一個Heroku帳戶。現在他們要求我將我的原始大師推送到我的heroku主機。當我這樣做時,我得到這個錯誤消息,我無法弄清楚。任何人有任何提示,我可以如何解決這個問題?非常感謝!Heroku錯誤消息沒有檢測到Cedar支持的應用程序

[email protected]:~/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) 
+0

你需要在你的項目文件夾中。 –

回答

5

我知道了!哦,主啊,我知道了!

恩...


所以,史蒂夫和科林是正確的。我確實需要在我的項目目錄中,以便Heroku能夠感知我的Ruby文件並相應地進行操作。當我將最初的應用程序推送到Bit Bucket時,我瘋狂起來。我將我的應用程序推到了主目錄中的Bit Bucket上。這使我的應用程序成爲了一個子文件夾,這反過來又使Heroku無法檢測到它的存在。

解決方案是選擇我的所有應用程序,單擊並拖動到桌面並刪除假主文件夾。我繼續將我的文件放回Bit Bucket存儲庫並添加,提交併將其推送到Bit Bucket。

如果發生這種情況,請確保您也將應用程序中的隱藏文件夾拖入新文件夾中,因爲這可能會讓您感到困擾。

謝謝大家!

13

您需要cd到您的項目目錄,我假設~/work-space是不是你的應用程序的名稱。

執行以下操作:cd path/to/root/of/your/project並再次嘗試該命令。

UPDATE

歷史上,這個比較重要的修復一直是兩件事情之一:

正確命名你的.buildpacks文件(確保它不是.buildpack

重新初始化您的.git文件:

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

這沒有奏效。 :/我得到相同的錯誤信息。 –

+0

我已經更新了我的答案,以包含其他各種修補程序。 –

相關問題