2012-11-07 49 views
5

我有一個Rails 3.2.3應用程序,我試圖使用Ruby 2.0.0preview1推送到Heroku(請參閱:http://blog.heroku.com/archives/2012/11/5/ruby-2-preview-on-heroku/)。Heroku:在Ruby 2.0.0下找不到'bundle command'

這是一個在Ruby 1.9下正常運行並且在Ruby 2.0.0下沒有問題的應用程序。

我現在遇到的錯誤是:

2012-11-07T15:19:32+00:00 heroku[web.1]: State changed from crashed to starting 
2012-11-07T15:19:37+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 3225 -c ./config/unicorn.rb` 
2012-11-07T15:19:38+00:00 app[web.1]: bash: bundle: command not found 
2012-11-07T15:19:39+00:00 heroku[web.1]: Process exited with status 127 
2012-11-07T15:19:39+00:00 heroku[web.1]: State changed from starting to crashed 

我通過的bash登錄到的Heroku和安裝捆紮機(創業板安裝捆綁),但沒有幫助。我也嘗試過改變GEM_PATH環境變量,但似乎也沒有做任何事情。

我在討論如何解決這個問題。任何幫助表示讚賞!

回答

5

我有同樣的事情:通過用Ruby 2.0.0創建一個新的Heroku應用程序並查看我應用程序的「heroku config」輸出與新應用程序的輸出來解決它。 後來我發現,這兩個GEM_PATH和路徑是不同的,所以我所做的:

$ heroku config:set GEM_PATH=vendor/bundle/ruby/2.0.0 
$ heroku config:set PATH=bin:vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin 

而且急,錯誤不見了!

(得到了這個想法:heroku: bash: bundle: command not found

+4

另請參閱Heroku Devcenter文章[更改Ruby版本中斷路徑](https://devcenter.heroku.com/articles/changing-ruby-version-breaks-path)。 – willglynn

+1

我剛剛收到Heroku的電子郵件,他們推薦你推薦的東西。 您可以在這裏看到有關更改Ruby版本的Heroku文檔:https://devcenter.heroku.com/articles/changing-ruby-version-breaks-path – cobrabyte

0

我只是修復了這個問題同事。確保你的buildpack是正確的。也就是說,如果你使用ruby,確保它是heroku/ruby​​。我們將其從node.js更改爲ruby構建包。

相關問題