fix: better isolate bundler usage from wider environment - #461
Merged
chadlwilson merged 1 commit intoAug 30, 2026
Merged
Conversation
chadlwilson
force-pushed
the
1.2-preboot-bundler-safely
branch
4 times, most recently
from
August 30, 2026 14:18
7c6ed74 to
03e923f
Compare
chadlwilson
marked this pull request as ready for review
August 30, 2026 14:19
…opinionated boot process - Ensure bundler tries to run with the system (embedded jruby) version by default; ignoring the locked version - Ensure bundler runs frozen by default, to avoid unnecessary resolution attempts and fail fast on gem combinations that won't work. - When booting rails, try and preboot bundler via `Bundler.setup` to workaround the default Rails `config/boot.rb`'s use of the CLI `bundler/setup`. This should make jruby-rack more reliable and easier to debug for modern bundler, requiring less rigorous alignment of bundler versions at build time to runtime, and avoiding lost error messages due to Bundler doing setup in 'CLI' mode, which requires tty checks.
chadlwilson
force-pushed
the
1.2-preboot-bundler-safely
branch
from
August 30, 2026 14:30
03e923f to
f55ee4e
Compare
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
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.
Bundler.setupto workaround the default Railsconfig/boot.rb's use of the CLIbundler/setup.bundler/setupis a CLI path, and involves checking for tty existence, things that will fail on embedded JRuby without particular JVM args. That failure to detect tty properly will then often obscure the actual root bundler error, by causing aSystem.exiton failure, which is caught within embedded JRuby, but now has swallowed the original bundler error.This should make jruby-rack more reliable and easier to debug for modern bundler, requiring less rigorous alignment of bundler versions at build time to runtime, and avoiding lost error messages due to Bundler doing setup in 'CLI' mode.