Working on Puma 6.0, I have hit this [1] issue rebuilding
rubygem-shoulda-matchers:
~~~
1) shoulda-matchers integrates with Rails in a project that uses Spring
Failure/Error: run_rake_tasks!('db:drop', 'db:create',
'db:migrate')
RuntimeError:
Command
"BUNDLE_GEMFILE=\"/tmp/shoulda-matchers-acceptance/test-project/Gemfile\"
bundle _2.5.3_ exec rake db:drop db:create db:migrate --trace" exited
with status 1.
Output:
---START----------------------------------------------------------------
bundler: failed to load command: rake (/usr/bin/rake)
/usr/share/gems/gems/bundler-2.5.3/lib/bundler/resolver.rb:332:in
`raise_not_found!': Could not find gem 'puma (~> 5.0)' in locally
installed gems. (Bundler::GemNotFound)
The source contains the following gems matching 'puma':
* puma-6.4.2
from
/usr/share/gems/gems/bundler-2.5.3/lib/bundler/resolver.rb:392:in `block
in prepare_dependencies'
from
/usr/share/gems/gems/bundler-2.5.3/lib/bundler/resolver.rb:377:in `each'
... snip ...
~~~
The thing is that RoR 7.0 hardcodes `"puma", "~> 5.0"` dependency.
Now
there are two options:
1) Relax the dependency in rubygem-should-matchers.
2) Relax the dependency in RoR in a similar way to RoR 7.1 [3] (and
maybe [4], but I have not hit any issue in anycable 🤷)
While the former is low impact, I lean towards the latter, despite
changing the generated application might put some users into risk. Thoughts?
Vít
[1]:
https://copr.fedorainfracloud.org/coprs/vondruch/mpb/build/6885290/
[2]:
https://github.com/rails/rails/blob/fc734f28e65ef8829a1a939ee6702c1f349a1...
[3]:
https://github.com/rails/rails/commit/545a9908e8f661aa391b5c8e418a5204b1e...
[4]:
https://github.com/rails/rails/pull/46106