问题
I meet trouble using Bundle to resolve gems conflict.
can't 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 that means active* are requiring builder v 2.1.2 when cucumber want the version 3.0.0. Easy, but ...
What i'm supposed to do with this ? Down grade cucumber ? I tried a bundle update but ... seams the last version of active model, pack and railties is 3.0.8. How could I know easily cucumber version compatible with active builder ?
Then, what is the general method to solve this kind of situation in general ?
回答1:
That's odd; Bundler should lock builder
to v2.1.2 when examining dependencies.
First, try running bundle update
to have Bundler re-resolve all your dependencies. This should correctly lock builder to v2.1.2.
Failing that, you can force builder v2.1.2 by adding it to your Gemfile
:
gem `builder`, `~> 2.1.2'
Then run bundle update builder
. This should add v2.1.2 to your Gemfile.lock
, which should work fine with Cucumber (it only requires >= 2.1.2).
See Yehuda Katz's recent blog post on Gem versioning and Bundler for a bit more detail.
来源:https://stackoverflow.com/questions/6338344/rails-bundle-gems-conflicts-best-way-to-solve-it