Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to push to Heroku (Ruby 2.3.4)

I keep getting this error while trying to push to heroku. Didn't have any problem a couple of days ago and I made no changes to my gemfile.

Here is the error that I'm getting when I push to heroku. It says "An error occurred while installing ruby-2.3.4", but I don't specify in my gem ruby-2.3.4 either, so there's no commenting out this line as suggested by some other stackoverflow answers.

Stellas-MBP:curlav StellaHan$ git push heroku master
Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.19 KiB | 0 bytes/s, done.
Total 9 (delta 7), 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-18/ruby-2.3.4.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-18/ruby-2.3.4.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:  !
remote:  !     An error occurred while installing ruby-2.3.4
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-18/ruby-2.3.4.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 fierce-shore-32264.
remote:
To https://git.heroku.com/fierce-shore-32264.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fierce-shore-32264.git'

Here is my gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
gem 'pg', '~> 0.20'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '~> 3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :production do
  gem 'rails_12factor'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'bootstrap-sass', '~> 3.3.7'
gem 'devise', '~> 4.2'

gem 'toastr-rails', "~> 1.0"

gem 'omniauth', '~> 1.6'
gem 'omniauth-facebook', '~> 4.0'
gem 'paperclip', '~> 5.1.0'
gem 'geocoder'

gem 'jquery-ui-rails', '~> 5.0'
gem 'momentjs-rails', '~> 2.17.1'

gem 'ransack', '~> 1.7'
gem 'twilio-ruby', '~> 4.11.1'
gem 'fullcalendar-rails', '~> 3.4.0'

gem 'stripe', '~> 3.0.0'
gem 'rails-assets-card', source: 'https://rails-assets.org'

gem 'omniauth-stripe-connect', '~> 2.10.0'
gem 'jquery-timepicker-addon-rails'

gem 'boxr'
gem 'redis', '~> 3.0'
gem 'aws-sdk', '~> 2.8'
like image 627
Stella Han Avatar asked Jan 02 '23 07:01

Stella Han


1 Answers

Heroku now requires Ruby version 2.4.4 so I had to include that into the Gemfile.

Include this at the top of your gem file: ruby "2.4.4"

See this document for more details: https://devcenter.heroku.com/articles/ruby-support#ruby-versions

like image 106
Stella Han Avatar answered Jan 05 '23 15:01

Stella Han