Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
9 changes: 4 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion rubygems.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading