-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fall back to ruby platform gem when precompiled variant is incompatible #9211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jeremy
wants to merge
1
commit into
ruby:master
Choose a base branch
from
jeremy:ruby-platform-fallback-on-incompatible-ruby-version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fall back to ruby platform gem when precompiled variant is incompatible #9211
jeremy
wants to merge
1
commit into
ruby:master
from
jeremy:ruby-platform-fallback-on-incompatible-ruby-version
+106
−20
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b8fab1b to
6a609e3
Compare
72e2f26 to
998b1da
Compare
jeremy
added a commit
to basecamp/fizzy
that referenced
this pull request
Dec 18, 2025
* Bundler 4.0.2 * Gem upgrades for Ruby 4 compat * rubocop 1.82.0 for rubocop/rubocop#14644 * web-push 3.1.0 for pushpad/web-push#19 * Git sources for fixes and pending releases * rinku: vmg/rinku#97 * Many platform-specific gems aren't compiled for Ruby 4 yet, which triggers a Bundler bug wherein it selects a chooses an imcompatible platform-specific gem rather than falling back to the ruby platform and compiling. Fix: ruby/rubygems#9211
jeremy
added a commit
to basecamp/fizzy
that referenced
this pull request
Dec 18, 2025
* Bundler 4.0.2 * Gem upgrades for Ruby 4 compat * rubocop 1.82.0 for rubocop/rubocop#14644 * web-push 3.1.0 for pushpad/web-push#19 * Git sources for fixes and pending releases * rinku: vmg/rinku#97 * Many platform-specific gems aren't compiled for Ruby 4 yet, which triggers a Bundler bug wherein it selects a chooses an imcompatible platform-specific gem rather than falling back to the ruby platform and compiling. Fix: ruby/rubygems#9211
jeremy
added a commit
to basecamp/fizzy
that referenced
this pull request
Dec 18, 2025
* Bundler 4.0.2 * Gem upgrades for Ruby 4 compat * rubocop 1.82.0 for rubocop/rubocop#14644 * web-push 3.1.0 for pushpad/web-push#19 * Git sources for fixes and pending releases * rinku: vmg/rinku#97 * Many platform-specific gems aren't compiled for Ruby 4 yet, which triggers a Bundler bug wherein it selects a chooses an imcompatible platform-specific gem rather than falling back to the ruby platform and compiling. Fix: ruby/rubygems#9211
jeremy
added a commit
to basecamp/fizzy
that referenced
this pull request
Dec 18, 2025
* Bundler 4.0.2 * Gem upgrades for Ruby 4 compat * rubocop 1.82.0 for rubocop/rubocop#14644 * web-push 3.1.0 for pushpad/web-push#19 * Git sources for fixes and pending releases * rinku: vmg/rinku#97 * Many platform-specific gems aren't compiled for Ruby 4 yet, which triggers a Bundler bug wherein it selects a chooses an imcompatible platform-specific gem rather than falling back to the ruby platform and compiling. Fix: ruby/rubygems#9211
When installing in frozen mode with a lockfile that includes platform- specific gems, Bundler now falls back to the generic ruby platform gem if the platform-specific variant has an incompatible required_ruby_version. This addresses scenarios where native gems are precompiled for Ruby versions up to 3.4 (with required_ruby_version < 3.5.dev) but the generic ruby gem works with Ruby 4.0. Previously, Bundler would select the incompatible precompiled gem and fail at install time. The fallback only applies in frozen mode. In non-frozen mode, Bundler continues to re-resolve and update the lockfile as before. Note: When this fallback occurs, the existing "platform specific gems are getting installed" warning may be shown. The message was written for the opposite scenario and could be improved in a follow-up.
998b1da to
62375e0
Compare
jeremy
added a commit
to basecamp/fizzy
that referenced
this pull request
Dec 18, 2025
* Bundler 4.0.2 * Gem upgrades for Ruby 4 compat * rubocop 1.82.0 for rubocop/rubocop#14644 * web-push 3.1.0 for pushpad/web-push#19 * Git sources for fixes and pending releases * rinku: vmg/rinku#97 * Many platform-specific gems aren't compiled for Ruby 4 yet, which triggers a Bundler bug wherein it selects a chooses an imcompatible platform-specific gem rather than falling back to the ruby platform and compiling. Fix: ruby/rubygems#9211
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When installing in frozen mode with a lockfile that includes platform-specific gems, Bundler now falls back to the generic ruby platform gem if the platform-specific variant has an incompatible required_ruby_version.
This addresses scenarios where native gems are precompiled for Ruby versions up to 3.4 (with required_ruby_version < 3.5.dev) but the generic ruby gem works with Ruby 4.0. Previously, Bundler would select the incompatible precompiled gem and fail at install time.
The fallback only applies in frozen mode. In non-frozen mode, Bundler continues to re-resolve and update the lockfile as before.
(Note: When this fallback occurs, the existing "platform specific gems are getting installed" warning may be shown. The message was written for the opposite scenario and could be improved in a follow-up.)
Make sure the following tasks are checked