2014-11-05 152 views
3

我正試圖將Rails應用程序推送到Heroku,但是我不斷收到此錯誤。Heroku:將Rails應用程序推送到Heroku時出錯,Heroku找不到Rails應用程序

Taimurs-MacBook-Pro:taimurknaziri.com taimurknaziri$ git push heroku master 
Initializing repository, done. 
Counting objects: 158, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (144/144), done. 
Writing objects: 100% (158/158), 671.52 KiB | 160.00 KiB/s, done. 
Total 158 (delta 32), reused 0 (delta 0) 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
! 
!  An error occurred while installing Ruby ruby-2.1.1 
!  For supported Ruby versions see https://devcenter.heroku.com/articles/ruby-support#supported-runtimes 
!  Note: Only the most recent version of Ruby 2.1 is supported on Cedar-14 
!  Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly: 
!  
!  gzip: stdin: unexpected end of file 
!  tar: Child returned status 1 
!  tar: Error is not recoverable: exiting now 
! 

!  Push rejected, failed to compile Ruby app 

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

我有研究一些可能的解決方案懸停在S.O上,但是沒有一個似乎工作。我試圖摧毀heroku應用程序然後重新創建它,我嘗試使用不同的ruby版本,但似乎也沒有工作。

+2

'注意:只有最新版本的Ruby 2.1支持Cedar-14'。最新版本似乎是2.1.4。你有沒有試過這個版本? – 2014-11-05 15:23:19

+0

是的,但我得到一個錯誤安裝它即時通訊試圖找出現在。 – scrippyfingers 2014-11-05 16:00:53

回答

5

Heroku的不支持版本2.1.1

你需要在你的Gemfile指定不同的版本:

# Gemfile 
source "https://rubygems.org" 
ruby '2.1.4' # or other from link above 

[...] 
+0

謝謝你。問題是,我有在rails 2.1.1上運行的應用程序,我應該更新到'2.1.4'嗎? @catsby – scrippyfingers 2014-11-06 03:22:18

+0

很可能 - 2.1.4是一個安全版本https://www.ruby-lang.org/zh/news/2014/10/27/ruby-2-1-4-released/ – catsby 2014-11-06 19:25:49

+0

好的很酷,再次感謝男人,欣賞它。 – scrippyfingers 2014-11-07 19:07:41