From 8579e563ad904bdd33e3cf9da8230b2317505b4d Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Tue, 26 Jan 2021 16:28:17 +0000 Subject: [PATCH] Enforce bundler version 1 for ruby 2.3.0 and 2.3.1 Fix https://github.com/ruby/setup-ruby/issues/148 --- bundler.js | 3 +++ dist/index.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bundler.js b/bundler.js index 349c323dd..e65275570 100644 --- a/bundler.js +++ b/bundler.js @@ -72,6 +72,9 @@ export async function installBundler(bundlerVersionInput, lockFile, platform, ru if (engine === 'ruby' && rubyVersion.match(/^2\.[012]/)) { console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2') bundlerVersion = '1' + } else if (engine === 'ruby' && rubyVersion.match(/^2\.3\.[01]/)) { + console.log('Ruby 2.3.0 and 2.3.1 have shipped with an old rubygems that only works with Bundler 1') + bundlerVersion = '1' } else if (engine === 'jruby' && rubyVersion.startsWith('9.1')) { // JRuby 9.1 targets Ruby 2.3, treat it the same console.log('JRuby 9.1 has a bug with Bundler 2 (https://github.com/ruby/setup-ruby/issues/108), using Bundler 1 instead on JRuby 9.1') bundlerVersion = '1' diff --git a/dist/index.js b/dist/index.js index ef7d9877f..428dcc410 100644 --- a/dist/index.js +++ b/dist/index.js @@ -44608,6 +44608,9 @@ async function installBundler(bundlerVersionInput, lockFile, platform, rubyPrefi if (engine === 'ruby' && rubyVersion.match(/^2\.[012]/)) { console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2') bundlerVersion = '1' + } else if (engine === 'ruby' && rubyVersion.match(/^2\.3\.[01]/)) { + console.log('Ruby 2.3.0 and 2.3.1 have shipped with an old rubygems that only works with Bundler 1') + bundlerVersion = '1' } else if (engine === 'jruby' && rubyVersion.startsWith('9.1')) { // JRuby 9.1 targets Ruby 2.3, treat it the same console.log('JRuby 9.1 has a bug with Bundler 2 (https://github.com/ruby/setup-ruby/issues/108), using Bundler 1 instead on JRuby 9.1') bundlerVersion = '1'