cds1995
cds1995

Reputation: 3

Deploying to Heroku using rails Error

I'm following along Michael Hartl's rails tutorial and am trying to deploy something to Heroku. Everything goes well until i run

    git push heroku master

as I get this error.

Counting objects: 211, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (189/189), done.
Writing objects: 100% (211/211), 36.50 KiB | 0 bytes/s, done.
Total 211 (delta 78), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote:        Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-2.0.0-p648.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote:        Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-2.0.0-p648.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:  !
remote:  !     An error occurred while installing ruby-2.0.0-p648
remote:  !     
remote:  !     Heroku recommends you use the latest supported Ruby version listed here:
remote:  !     https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote:  !     
remote:  !     For more information on syntax for declaring a Ruby version see:
remote:  !     https://devcenter.heroku.com/articles/ruby-versions
remote:  !     
remote:  !     
remote:  !     Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-2.0.0-p648.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote:  !     
remote:  !     gzip: stdin: unexpected end of file
remote:  !     tar: Child returned status 1
remote:  !     tar: Error is not recoverable: exiting now
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to secret-escarpment-31638.
remote: 
To https://git.heroku.com/secret-escarpment-31638.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/secret-escarpment-31638.git'

I'm guessing that it's due to heroku not being able to run ruby 2.0.0 but I checked their documentation and found that 2.0.0 is still valid on heroku. Here's the link https://devcenter.heroku.com/articles/ruby-support#supported-runtimes.

I'm on Rails 4.0.8 and Ruby 2.0.0

Gemfile

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.8'
gem 'bootstrap-sass', '2.3.2.0'
gem 'sprockets', '2.11.0'
group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
end
group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
# Uncomment this line on OS X.
# gem 'growl', '1.0.3'
# Uncomment these lines on Linux.
# gem 'libnotify', '0.8.0'
# Uncomment these lines on Windows.
# gem 'rb-notifu', '0.0.4'
# gem 'wdm', '0.1.0'
end
gem 'sass-rails', '4.0.3'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
  gem 'sdoc', '0.3.20', require: false
end
group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

Thanks in advance

Upvotes: 0

Views: 392

Answers (3)

Navin
Navin

Reputation: 646

Since it is testing site, you can comment ruby version in your Gemfile, then commit and push to heroku

Upvotes: 4

puneet18
puneet18

Reputation: 4427

comment ruby '2.0.0' in Gemfile and push to heroku.

Upvotes: 0

Arif Usman
Arif Usman

Reputation: 1728

Heroku doesn't support Ruby 2.0.0. Like it says in the errors, you can find which ruby runtimes work here

Upvotes: 0

Related Questions