Recent builds are failing with the following error:
5:00:32 AM: ERROR: Error installing bundler:
5:00:32 AM: bundler requires RubyGems version >= 3.0.0. Try 'gem update --system' to update RubyGems itself.
5:00:32 AM: Error installing bundler
This also affects builds that don't use Ruby at all.
Possible fix is to update default Ruby version to 2.6.0 here: https://github.com/netlify/build-image/blob/master/run-build-functions.sh#L282
Yeah, this seems to be a result of the update to Bundler 2.0. In the docker image it is installing bundler by default but 2.0 no longer supports 2.2.
Removed support for Ruby < 2.3
So it will need to be decided what version of ruby it needs to bump up to.
for the time being, we aren't going to support ruby 2.2 because of the update to bundler. That seems reasonable b/c it was decommissioned back in June.
The default for our system is 2.3.6 (which has until March iirc). Please reach out to support if this is a large problem.
Closing for the time being.
@rybit this is a problem with the default settings. We aren't using ruby in our project, but because of the docker image installing it, we needed to define the RUBY_VERSION in the environment variables for it to build properly, overriding the default.
The default for our system is 2.3.6 (which has until March iirc). Please reach out to support if this is a large problem.
@rybit We ran in to this issue where the Ruby version was defaulting to 2.2.3 even though we don't set it anywhere in our env (our app is not a Ruby app). It was causing our builds to fail.

It would be nice to at least explicitly set the Ruby version to the default that bundler supports or figure out the root cause of the above issue.
so we just updated this to not be that version any longer. The default should be 2.3.6 when you don't explicitly set it
@rybit Whatever y'all changed our builds are now installing 2.3.6 without the RUBY_VERSION env set. Thanks!
Most helpful comment
Yeah, this seems to be a result of the update to Bundler 2.0. In the docker image it is installing bundler by default but 2.0 no longer supports 2.2.
So it will need to be decided what version of ruby it needs to bump up to.