diff --git a/bundler.js b/bundler.js index 8c945d6e0..711871bae 100644 --- a/bundler.js +++ b/bundler.js @@ -137,14 +137,11 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock } const gem = path.join(rubyPrefix, 'bin', 'gem') - // Workaround for https://github.com/rubygems/rubygems/issues/5245 - // and for https://github.com/oracle/truffleruby/issues/2780 - const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : [] const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0` - await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint]) + await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint]) return bundlerVersion } diff --git a/dist/index.js b/dist/index.js index d231f96b0..b03752c56 100644 --- a/dist/index.js +++ b/dist/index.js @@ -151,14 +151,11 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p } const gem = path.join(rubyPrefix, 'bin', 'gem') - // Workaround for https://github.com/rubygems/rubygems/issues/5245 - // and for https://github.com/oracle/truffleruby/issues/2780 - const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : [] const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0` - await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint]) + await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint]) return bundlerVersion } @@ -71454,8 +71451,10 @@ async function rubygemsLatest(gem, platform, engine, rubyVersion) { const floatVersion = common.floatVersion(rubyVersion) if (common.isHeadVersion(rubyVersion)) { console.log('Ruby master builds use included RubyGems') - } else if (floatVersion >= 3.1) { + } else if (floatVersion >= 3.2) { await exec.exec(gem, ['update', '--system']) + } else if (floatVersion >= 3.1) { + await exec.exec(gem, ['update', '--system', '3.6.9']) } else if (floatVersion >= 3.0) { await exec.exec(gem, ['update', '--system', '3.5.23']) } else if (floatVersion >= 2.6) { diff --git a/rubygems.js b/rubygems.js index f96cfca62..9c4609c54 100644 --- a/rubygems.js +++ b/rubygems.js @@ -39,8 +39,10 @@ async function rubygemsLatest(gem, platform, engine, rubyVersion) { const floatVersion = common.floatVersion(rubyVersion) if (common.isHeadVersion(rubyVersion)) { console.log('Ruby master builds use included RubyGems') - } else if (floatVersion >= 3.1) { + } else if (floatVersion >= 3.2) { await exec.exec(gem, ['update', '--system']) + } else if (floatVersion >= 3.1) { + await exec.exec(gem, ['update', '--system', '3.6.9']) } else if (floatVersion >= 3.0) { await exec.exec(gem, ['update', '--system', '3.5.23']) } else if (floatVersion >= 2.6) {