Skip to content

Commit 8d6236c

Browse files
hsbteregon
authored andcommitted
Bundler-2.4 requires Ruby 2.6 or later.
1 parent 4b2d1d6 commit 8d6236c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bundler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
107107
}
108108

109109
// Use Bundler 1 when we know Bundler 2 does not work
110+
// Use Bundler 2.3 when we use Ruby 2.3.2-2.5
110111
if (bundlerVersion.startsWith('2')) {
111112
if (engine === 'ruby' && floatVersion <= 2.2) {
112113
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2')
113114
bundlerVersion = '1'
114115
} else if (engine === 'ruby' && /^2\.3\.[01]/.test(rubyVersion)) {
115116
console.log('Ruby 2.3.0 and 2.3.1 have shipped with an old rubygems that only works with Bundler 1')
116117
bundlerVersion = '1'
118+
} else if (engine === 'ruby' && floatVersion <= 2.5) {
119+
console.log('Ruby 2.3.2-2.5 only works with Bundler 2.3')
120+
bundlerVersion = '2.3'
117121
} else if (engine === 'jruby' && rubyVersion.startsWith('9.1')) { // JRuby 9.1 targets Ruby 2.3, treat it the same
118122
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')
119123
bundlerVersion = '1'

dist/index.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)