Commit 6ca05e6
committed
Explicitly use bundler 2.7 on Ruby 4 CI
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.1 parent 9ba4ae9 commit 6ca05e6
2 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments