-
Notifications
You must be signed in to change notification settings - Fork 254
Explicitly use bundler 2.7 on Ruby 4 CI #3794
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
Conversation
.github/workflows/test.yml
Outdated
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby }} | ||
| bundler: 2.7.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ruby 4.0 ships with bundler 4.0, so even though you install 2.7, it's going to use 4.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...looks like maybe the BUNDLER_VERSION envvar will do the trick instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh, looks like we need both.
24c9a9b to
22270eb
Compare
Fixes a CI failure that can be seen on these CI runs: * https://github.com/projectblacklight/blacklight/actions/runs/20819455247/job/59803659992 * https://github.com/projectblacklight/blacklight/actions/runs/20789330303/job/59774334565 When we did not specify a bundler version, we got this message in the CI logs: ``` Using Bundler shipped with ruby-4.0.0 ``` Then this one: ``` rails importmap:install /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:356:in 'Bundler::Resolver#raise_not_found!': Could not find gems matching 'sqlite3 (>= 2.1)' valid for all resolution platforms (aarch64-linux-gnu, aarch64-linux-musl, arm-linux-gnu, arm-linux-musl, arm64-darwin, x86_64-darwin, x86_64-linux-gnu, x86_64-linux-musl, x86_64-linux) in locally installed gems. (Bundler::GemNotFound) The source contains the following gems matching 'sqlite3 (>= 2.1)': * sqlite3-2.9.0-x86_64-linux-gnu from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:450:in 'block in Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Hash#each' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Enumerable#filter_map' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:63:in 'Bundler::Resolver#setup_solver' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:28:in 'Bundler::Resolver#start' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:755:in 'Bundler::Definition#start_resolution' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:350:in 'Bundler::Definition#resolve' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:668:in 'Bundler::Definition#materialize' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:240:in 'Bundler::Definition#specs' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:312:in 'Bundler::Definition#specs_for' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/runtime.rb:18:in 'Bundler::Runtime#setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler.rb:165:in 'Bundler.setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in 'block in <top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:177:in 'Bundler::UI::Shell#with_level' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:122:in 'Bundler::UI::Shell#silence' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in '<top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in 'Kernel#require' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in '<top (required)>' from <internal:gem_prelude>:2:in '<internal:gem_prelude>' rails turbo:install stimulus:install /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:356:in 'Bundler::Resolver#raise_not_found!': Could not find gems matching 'sqlite3 (>= 2.1)' valid for all resolution platforms (aarch64-linux-gnu, aarch64-linux-musl, arm-linux-gnu, arm-linux-musl, arm64-darwin, x86_64-darwin, x86_64-linux-gnu, x86_64-linux-musl, x86_64-linux) in locally installed gems. (Bundler::GemNotFound) The source contains the following gems matching 'sqlite3 (>= 2.1)': * sqlite3-2.9.0-x86_64-linux-gnu from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:450:in 'block in Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Hash#each' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Enumerable#filter_map' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:63:in 'Bundler::Resolver#setup_solver' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:28:in 'Bundler::Resolver#start' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:755:in 'Bundler::Definition#start_resolution' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:350:in 'Bundler::Definition#resolve' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:668:in 'Bundler::Definition#materialize' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:240:in 'Bundler::Definition#specs' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:312:in 'Bundler::Definition#specs_for' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/runtime.rb:18:in 'Bundler::Runtime#setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler.rb:165:in 'Bundler.setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in 'block in <top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:177:in 'Bundler::UI::Shell#with_level' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:122:in 'Bundler::UI::Shell#silence' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in '<top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in 'Kernel#require' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in '<top (required)>' from <internal:gem_prelude>:2:in '<internal:gem_prelude>' rails css:install:bootstrap /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:356:in 'Bundler::Resolver#raise_not_found!': Could not find gems matching 'sqlite3 (>= 2.1)' valid for all resolution platforms (aarch64-linux-gnu, aarch64-linux-musl, arm-linux-gnu, arm-linux-musl, arm64-darwin, x86_64-darwin, x86_64-linux-gnu, x86_64-linux-musl, x86_64-linux) in locally installed gems. (Bundler::GemNotFound) The source contains the following gems matching 'sqlite3 (>= 2.1)': * sqlite3-2.9.0-x86_64-linux-gnu from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:450:in 'block in Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Hash#each' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Enumerable#filter_map' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:425:in 'Bundler::Resolver#prepare_dependencies' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:63:in 'Bundler::Resolver#setup_solver' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/resolver.rb:28:in 'Bundler::Resolver#start' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:755:in 'Bundler::Definition#start_resolution' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:350:in 'Bundler::Definition#resolve' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:668:in 'Bundler::Definition#materialize' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:240:in 'Bundler::Definition#specs' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/definition.rb:312:in 'Bundler::Definition#specs_for' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/runtime.rb:18:in 'Bundler::Runtime#setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler.rb:165:in 'Bundler.setup' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in 'block in <top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:177:in 'Bundler::UI::Shell#with_level' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/ui/shell.rb:122:in 'Bundler::UI::Shell#silence' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundler/setup.rb:32:in '<top (required)>' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in 'Kernel#require' from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/rubygems.rb:1454:in '<top (required)>' from <internal:gem_prelude>:2:in '<internal:gem_prelude>' ``` ...and then the generated app did not have any CSS or JS, causing test failures. This commit takes a two-pronged approach: it installs bundler 2.7.2, and then uses the `BUNDLER_VERSION` envvar to make sure that we use it when generating the internal test app.
Fixes a CI failure that can be seen on these CI runs:
When we did not specify a bundler version, we got this message in the CI logs:
Then this one:
...and then the generated app did not have any CSS or JS, causing test failures.
This commit takes a two-pronged approach: it installs bundler 2.7.2, and then uses the
BUNDLER_VERSIONenvvar to make sure that we use it when generating the internal test app.
See also #3784 and projectblacklight/blacklight_range_limit#328