Reputation: 63
I'm writing a Ruby gem / Rails engine, blacklight_allmaps, and using GitHub Actions for CI. Yesterday, my test builds for Ruby v3.2 passed fine, but my Ruby v3.3 tests began to fail with an odd error:
Could not find gems matching 'blacklight_allmaps (= 0.2.0)' valid for all
resolution platforms () in source at
`/home/runner/work/blacklight-allmaps/blacklight-allmaps`.
The source contains the following gems matching 'blacklight_allmaps (= 0.2.0)':
* blacklight_allmaps-0.2.0
Done generating test app
/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/resolver.rb:336:in `raise_not_found!': Could not find gems matching 'blacklight_allmaps (= 0.2.0)' valid for all resolution platforms () in source at `/home/runner/work/blacklight-allmaps/blacklight-allmaps`. (Bundler::GemNotFound)
The source contains the following gems matching 'blacklight_allmaps (= 0.2.0)':
* blacklight_allmaps-0.2.0
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:613:in `block in materialize'
from <internal:kernel>:187:in `loop'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:600:in `materialize'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:203:in `specs'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:270:in `specs_for'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/runtime.rb:18:in `setup'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler.rb:162:in `setup'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/setup.rb:26:in `block in <top (required)>'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/ui/shell.rb:159:in `with_level'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/ui/shell.rb:111:in `silence'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/setup.rb:26:in `<top (required)>'
from <internal:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from <internal:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems.rb:1382:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/opt/hostedtoolcache/Ruby/3.3.1/x64/bin/ruby -I/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/resolver.rb:336:in `raise_not_found!': Could not find gems matching 'blacklight_allmaps (= 0.2.0)' valid for all resolution platforms () in source at `/home/runner/work/blacklight-allmaps/blacklight-allmaps`. (Bundler::GemNotFound)
The source contains the following gems matching 'blacklight_allmaps (= 0.2.0)':
* blacklight_allmaps-0.2.0
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:613:in `block in materialize'
from <internal:kernel>:187:in `loop'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:600:in `materialize'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:203:in `specs'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/definition.rb:270:in `specs_for'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/runtime.rb:18:in `setup'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler.rb:162:in `setup'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/setup.rb:26:in `block in <top (required)>'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/ui/shell.rb:159:in `with_level'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/ui/shell.rb:111:in `silence'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/bundler/setup.rb:26:in `<top (required)>'
from <internal:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from <internal:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/rubygems.rb:1382:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
/opt/hostedtoolcache/Ruby/3.3.1/x64/bin/ruby -I/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib:/opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
Re-running test builds from two weeks ago that did pass CI now also fail with this same error: https://github.com/bplmaps/blacklight-allmaps/actions/runs/8668487468
This seems possibly related to the recent Ruby v3.3.1 and Bundler v2.5.9 releases, but even my attempts to pin Ruby down to v3.3.0 and Bundler down to v2.5.5, I'm still seeing the same error.
Anyone have any suggestions? I'm running short of ideas on how to troubleshoot.
Tried to roll back to Ruby v3.3.0 and Blunder v2.5.5, but this error still persists.
Upvotes: 1
Views: 85
Reputation: 63
Forcing a platform into the bundle for my CI workflow resolved this issue.
In my GitHub Actions CI workflow file, I added a "Lock platform version" entry:
...
- name: Lock platform version
run: bundle lock --add-platform ruby
- name: Install dependencies
run: bundle install
...
With this change in place, Ruby v3.3.1 has a bundle platform it can use and afterwards it resolves the local blacklight_allmaps gem I'm writing.
I don't know exactly WHY this is necessary... it's much too far up the Ruby chain for me, but it allows my build to finalize and the tests to run properly.
I'll take the win.
Upvotes: 0