Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to Heroku button failing to deploy #3508

Open
mpoli opened this issue Nov 12, 2021 · 1 comment
Open

Deploy to Heroku button failing to deploy #3508

mpoli opened this issue Nov 12, 2021 · 1 comment

Comments

@mpoli
Copy link

mpoli commented Nov 12, 2021

The "Deploy to Heroku" button on the REAME page isn't working.

It seems like the problem lays with stack/buildpack selection in Heroku.

A full log is provided below:

-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
 !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
			Detected buildpacks: Ruby,Node.js
			See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Installing bundler 2.2.21
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
       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.5.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
       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.5.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
 !
 !     The Ruby version you are trying to install does not exist on this stack.
 !     
 !     You are trying to install ruby-2.6.5 on heroku-20.
 !     
 !     Ruby ruby-2.6.5 is present on the following stacks:
 !     
 !     - heroku-18
 !     
 !     Heroku recommends you use the latest supported Ruby version listed here:
 !     https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
 !     
 !     For more information on syntax for declaring a Ruby version see:
 !     https://devcenter.heroku.com/articles/ruby-versions
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed
@Matho
Copy link
Contributor

Matho commented Nov 12, 2021

Hi @mpoli

The log says, that you try to use ruby-2.6.5 on heroku-20 stack (which is default now), but that version of Ruby is not supported on heroku-20. It suggest to use the older heroku-18 stack, instead of default heroku-20

You can find the solution on this link https://stackoverflow.com/questions/66279424/you-are-trying-to-install-ruby-2-6-3-on-heroku-20

This command should show you, which stack is default (heroku-20)
$ heroku stack

This will switch your default stack to heroku-18 for all new apps
$ heroku stack:set heroku-18

If you want to use heroku-18 only for one app, this --app switch should work
$ heroku stack:set heroku-18 --app your-app-name

Currently supported Ruby versions for heroku-20 can be seen here:
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes

More info about stacks and stack EOL is available on
https://devcenter.heroku.com/articles/stack

To fix the 'deploy to Heroku' button, the maintainers need to upgrade ruby version to the supported one from the ruby list in heroku-20 stack

Did this instructions fix your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants