Heroku:将Rails应用程序推送到Heroku时出错,Heroku找不到Rails应用程序。

3

我试图将一个Rails应用程序推送到Heroku,但是不断收到这个错误。

user$ 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 git@heroku.com:user.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:user.git'

我在 Stack Overflow 上研究了一些可能的解决方案,但似乎都没有奏效。我尝试销毁 Heroku 应用程序,然后重新创建它,并尝试使用不同的 Ruby 版本,但这也似乎没有起作用。


2
注意:Cedar-14仅支持Ruby 2.1的最新版本。最新版本似乎是2.1.4。您尝试过这个版本吗? - Justin Wood
是的,但我在安装时遇到了一个错误,现在正在努力解决。 - illywilly
1个回答

5

谢谢,兄弟。不过我有个问题,我的应用程序正在运行Rails 2.1.1版本,我应该将它们更新到'2.1.4'吗?@catsby - illywilly
可能 - 2.1.4是一个安全版本发布 https://www.ruby-lang.org/en/news/2014/10/27/ruby-2-1-4-released/ - catsby

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接