Rails bundle, gems conflicts, the best way to solve it

I encounter the problem of using the Bundle to resolve a gem conflict.

cannot activate builder (~> 2.1.2, runtime) for ["activemodel-3.0.8", "actionpack-3.0.8", "railties-3.0.8"], already activated builder-3.0. 0 for ["cucumber-0.10.6"] (Gem :: LoadError)

So, for active * builder v 2.1.2 is required, when the cucumber wants version 3.0.0. Easy but ...

What should I do with this? Cucumber in the lower class? I tried updating the package, but ... the seams of the latest version of the active model, package and railties are 3.0.8. How can I easily find out a version of a cucumber compatible with an active constructor?

Then what is the general method for solving this situation in general?

+3
source share
1 answer

This is strange; The bundler should block builderbefore v2.1.2 when analyzing dependencies.

First try running bundle updateto have the Bundler re-resolve all your dependencies. This should correctly block the builder for v2.1.2.

Otherwise, you can force builder v2.1.2 to add it to your own Gemfile:

gem `builder`, `~> 2.1.2'

Then run bundle update builder. This should add v2.1.2 to yours Gemfile.lock, which should work fine with Cucumber (only> = 2.1.2 is required).

See the Yehuda Katz news blog on Gem versioning and the Bundler for more details.

+2
source

All Articles