Reputation: 111
Hi I get this error while trying to push to heroku. Currently using Rails -v "4.2.1" and ruby "2.3.0" (Bundler 1.14.6). Appreciate if anyone can help! Thank you very much!
169-29:SimpleSurvey minhvu$ git push heroku master
Counting objects: 362, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (303/303), done.
Writing objects: 100% (362/362), 701.13 KiB | 0 bytes/s, done.
Total 362 (delta 53), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: !
remote: ! An error occurred while installing ruby-2.3.0
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.3.0.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 immense-castle-65942.
remote:
To https://git.heroku.com/immense-castle-65942.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/immense-castle-65942.git'
Get this second error while trying to upgrade to Ruby 2.3.4 using RVM
169-29:SimpleSurvey minhvu$ rvm upgrade 2.3.0 2.3.4
Warning! PATH is not properly set up, '/Users/minhvu/.rvm/gems/ruby-2.3.0/bin' is not at first place.
Usually this is caused by shell initialization files. Search for 'PATH=...' entries.
You can also re-add RVM to your profile by running: 'rvm get stable --auto-dotfiles'.
To fix it temporarily in this shell session run: 'rvm use ruby-2.3.0'.
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
Are you sure you wish to upgrade from ruby-2.3.0 to ruby-2.3.4? (Y/n): Y
Installing new ruby ruby-2.3.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.3.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
ERROR: '/usr/local/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
Unable to install ruby ruby-2.3.4. Please install it manually to continue.
Upvotes: 0
Views: 678
Reputation: 4427
Try to comment ruby 2.3.0
line in Gemfile
and push code to heroku.
Upvotes: 4
Reputation: 23711
Seems like you amend the commit or something which is causing the issue
You may try to force push the changes.
git push heroku master -f
Note: This will overwrite the old commit history with the new one if you have amend the commit
Solution 2:
This error suggest you should try changing the ruby version
An error occurred while installing ruby-2.3.0
Heroku recommends you use the latest supported Ruby version listed here:
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
Can you please try to change the ruby version to 2.3.4
Upvotes: 0