Bundler "Could not find compatible versions for gem X" in CI
Bundler walked your dependency graph and proved no version of a shared gem satisfies every requirement at once. It prints the conflicting requirements and the requested ranges so you can see which two collide.
What this error means
bundle install or bundle update fails with "Could not find compatible versions for gem X" followed by the requirements that each demand a different range, often via transitive dependencies.
Bundler could not find compatible versions for gem "concurrent-ruby":
In Gemfile:
rails (~> 7.1) was resolved to 7.1.3, which depends on
activesupport (= 7.1.3) was resolved to 7.1.3, which depends on
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (= 1.8.0) was resolved to 1.8.0, which depends on
concurrent-ruby (~> 1.0, < 1.2)Common causes
A direct pin caps a shared transitive dependency
One gem you pin caps a shared dependency below what another gem now requires, so no single version fits both.
Mismatched major versions in the Gemfile
Two gems were bumped independently and now require incompatible major ranges of a common dependency.
How to fix it
Loosen or upgrade the capping requirement
- Read the two requirement chains Bundler prints to find the shared gem.
- Upgrade the gem that holds the lower cap, or relax the direct pin that conflicts.
- Re-run bundle update for the involved gems to confirm resolution.
bundle update i18n concurrent-rubyPin the shared gem to the overlapping version
If a single version satisfies both chains, add it explicitly so the resolver has a feasible point.
gem 'concurrent-ruby', '1.1.10'How to prevent it
- Upgrade related gems together so shared deps stay compatible.
- Prefer pessimistic ranges over hard equality pins where possible.
- Run bundle update locally and commit the lockfile before pushing.