2012-07-18 99 views
0

希望瞭解如何使用Heroku部署Rails 2.3.8。當我嘗試推送到heroku時,出現以下錯誤消息:錯誤:將Rails 2.3.8應用程序部署到heroku

git push heroku master 
    Enter passphrase: 
    Counting objects:3, done. 
    Compressing objects: 100 % (2/2), done. 
    Writing onject: 100 % (3/3), 4.34 KiB, done. 
    Total 3 (delta 0), reused 0 (delta 0) 

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

    To [email protected]: falling-sunrise.git 
    [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to '[email protected]:falling-sunrise.git' 

我還附加了我的命令行屏幕的實際屏幕截圖。我讀了一些地方,我可能不得不寫一個gemfile來推動工作。我也這樣做,並將其添加到我的應用程序的根,但沒有運氣。

+1

傢伙謝謝你的幫助。只是想出了什麼是錯的。我從來沒有真的推鐵路的應用程序!我是Git的新手,並沒有意識到你需要在提交之前添加每個文件 – user1536340 2012-07-19 23:23:19

+0

請注意,如果你懶惰,並確定你的測試通過,你可以'git commit -a -m'commit這裏的消息「提交工作目錄中的所有修改和新文件。如果你只是改變了一堆文件,並且/或者重新生成了一些靜態內容,這很有用。 – elithrar 2012-07-20 02:16:32

回答

0

你能提供你的應用程序的佈局嗎?確保在本地運行bundle install並檢查您的Gemfile;它可能沒有正確配置,或者您沒有將新文件(包括重要的Gemfile.lock)添加到git中。

另見https://devcenter.heroku.com/articles/ruby-support#rails_2x_applications

+0

我的佈局是這樣的: -.git -app -config -console -db -doc -Gemfile -Gemfile.lock -lib -log -public -Rakefile -readme -script -test -tmp -vendor – user1536340 2012-07-19 22:22:16

+0

而且我在編寫gemfile之後運行了bundle install。並將所有新文件推送到git – user1536340 2012-07-19 22:24:24

0

嘗試捆綁你的Gemfile,並確保它是完整的。如果不工作,你可以嘗試推你的應用竹堆棧:

https://devcenter.heroku.com/articles/bamboo

+0

請注意,您無法將*從* Cedar遷移到Bamboo。您需要在Bamboo堆棧上創建一個新應用程序。 – elithrar 2012-07-19 03:08:17

+0

這次我嘗試推送應用程序到一個竹棧,並收到不同的錯誤:「Heroku推拒絕,沒有Rails或Rack應用程序檢測到 – user1536340 2012-07-19 22:31:46

+0

這仍然是」相同「的錯誤 - Heroku不知道如何處理你的應用程序。就像你對它進行分類。 – elithrar 2012-07-20 02:15:21