Heroku:向Heroku推送Rails应用程序时出错,Heroku找不到Rails应用程序 [英] Heroku: Error pushing Rails app to Heroku, Heroku can't find Rails app

查看:136
本文介绍了Heroku:向Heroku推送Rails应用程序时出错,Heroku找不到Rails应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  user $ git push heroku 

我试图将Rails应用程序推送到Heroku,但我经常遇到这个错误。掌握
初始化仓库,完成。
计数对象:158,完成。
使用多达4个线程的增量压缩。
压缩对象:100%(144/144),完成。
写作对象:100%(158/158),671.52 KiB | 160.00 KiB / s,完成。
共计158(增量32),重用0(增量0)

-----> Ruby应用检测到
----->编译Ruby / Rails

!安装Ruby ruby​​-2.1.1
时发生错误!有关支持的Ruby版本,请参阅https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
!注意:Cedar-14
仅支持最新版本的Ruby 2.1!命令:'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 - '意外失败:

! gzip:stdin:文件意外结束
! tar:孩子返回状态1
! tar:错误不可恢复:现在退出


!推送被拒绝,未能编译Ruby应用程序

到git@heroku.com:user.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能将一些文件推送到'git@heroku.com:user.git'

我研究了一些可能的解决方案,但是其中没有一个似乎可行。我尝试销毁heroku应用程序然后重新创建它,我尝试了使用不同的ruby版本,但似乎也没有工作。

Heroku 不支持版本2.1.1





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

 #Gemfile 
sourcehttps:// ruby​​gems。 org
ruby​​'2.1.4'#或其他来自以上链接的链接

[...]


I am attempting to push a Rails app to Heroku however I am constantly getting this error.

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'

I have research some possible solutions hover around on S.O however none of which seemed to work. I tried destroying the heroku app then recreating it and I tried using different ruby versions but that didnt seem to work either.

解决方案

Heroku does not support version 2.1.1

You need to specify a different version in your Gemfile:

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

[...]

这篇关于Heroku:向Heroku推送Rails应用程序时出错,Heroku找不到Rails应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆