Skip to content

fix: improve isolation and bundler version/CLI boot issues with more opinionated boot process - #462

Merged
chadlwilson merged 1 commit into
jruby:masterfrom
chadlwilson:preboot-bundler-safely
Aug 30, 2026
Merged

fix: improve isolation and bundler version/CLI boot issues with more opinionated boot process#462
chadlwilson merged 1 commit into
jruby:masterfrom
chadlwilson:preboot-bundler-safely

Conversation

@chadlwilson

Copy link
Copy Markdown
Contributor

(forward-port from 1.2.x)

  • 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.

…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.

# Conflicts:
#	CHANGELOG.md
#	pom.xml
#	src/main/ruby/jruby/rack/booter.rb
#	src/main/ruby/jruby/rack/rails/environment.rb
#	src/main/ruby/jruby/rack/version.rb
#	src/spec/ruby/jruby/rack/rails_booter_spec.rb
@chadlwilson
chadlwilson force-pushed the preboot-bundler-safely branch from 72ac703 to dd2afc1 Compare August 30, 2026 14:58
@chadlwilson
chadlwilson marked this pull request as ready for review August 30, 2026 15:12
@chadlwilson
chadlwilson merged commit a914057 into jruby:master Aug 30, 2026
12 checks passed
@chadlwilson
chadlwilson deleted the preboot-bundler-safely branch August 30, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant