I have tried changing the gemfile to an earlier version and then pushing again but it does not seem to work. Here is the code. Any ideas?
Not sure I have posted in the correct format, this is my first SO post.
Any help would be appreciated, my command git push heroku master
generates that output.
Counting objects: 133, done.
Compressing objects: 100% (109/109), done.
Writing objects: 100% (133/133), 152.51 KiB | 3.81 MiB/s, done.
Total 133 (delta 14), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.1.4
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
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-20/ruby-2.6.3.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-20/ruby-2.6.3.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:
remote: !
remote: ! The Ruby version you are trying to install does not exist on this stack.
remote: !
remote: ! You are trying to install ruby-2.6.3 on heroku-20.
remote: !
remote: ! Ruby ruby-2.6.3 is present on the following stacks:
remote: !
remote: ! - cedar-14
remote: ! - heroku-16
remote: ! - heroku-18
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: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 5cf5d180a3b3f6f75291fac84f9be0b99d863efc
remote: !
remote: ! We have detected that you have triggered a build from source code with version 5cf5d180a3b3f6f75291fac84f9be0b99d863efc
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a enter code heredifferent branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to afternoon-garden-77939.
remote:
To https://git.heroku.com/afternoon-garden-77939.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/afternoon-garden-77939.git'
heroku stack
heroku stack:set heroku-18
detail view https://devcenter.heroku.com/articles/stack
haohaobaozhi has the perfect answer here.
heroku stack:set heroku-18
I was having the same issue as OP and setting the stack to Heroku-18 solved the issue. This might be a common occurrence for those following the "Learn Enough Ruby On Rails To Be Dangerous" Book.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With