When trying to deploy an app with a ruby version not supported by the current stack, it would be nice to show an explicit error and stop the execution early, instead of letting the build continue and fail at some point with an error that is hard to understand and debug.
For example, when trying to deploy an app with ruby 2.7.8 on the scalingo-22 stack, we get that kind of error:
-----> Using Ruby version: ruby-2.7.8
-----> Installing dependencies using bundler 2.3.25
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
Bundler Output: Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
!
! Failed to install gems via Bundler.
!
! An error occurred during buildpack compilation
! Error deploying the application
! → Invalid return code from buildpack
When trying to deploy an app with a ruby version not supported by the current stack, it would be nice to show an explicit error and stop the execution early, instead of letting the build continue and fail at some point with an error that is hard to understand and debug.
For example, when trying to deploy an app with ruby 2.7.8 on the scalingo-22 stack, we get that kind of error: