Rails捆绑包,宝石冲突,解决它的最佳方法 [英] Rails Bundle, gems conflicts, best way to solve it

查看:75
本文介绍了Rails捆绑包,宝石冲突,解决它的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Bundle解决宝石冲突时遇到麻烦。

I meet trouble using Bundle to resolve gems conflict.


无法激活构建器(〜> 2.1.2,运行时) [ activemodel-3.0.8, actionpack-3.0.8, railties-3.0.8],已经为[ cucumber-0.10.6](Gem :: LoadError)激活了builder-3.0.0。 / p>

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)

因此,当黄瓜想要版本3.0.0时,active *需要构建器v 2.1.2。
容易,但是...

So that means active* are requiring builder v 2.1.2 when cucumber want the version 3.0.0. Easy, but ...

我应该怎么做?
劣质黄瓜?
我尝试了捆绑更新,但是...接缝的活动模型,背包和护腿的最新版本是3.0.8。
我怎么能轻易地知道与活动构建器兼容的黄瓜版本?

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 ?

推荐答案

这很奇怪;在检查依赖项时,Bundler应将 builder 锁定到v2.1.2。

That's odd; Bundler should lock builder to v2.1.2 when examining dependencies.

首先,尝试运行捆绑包更新,让Bundler重新解析所有依赖项。 应该正确将构建器锁定到v2.1.2。

First, try running bundle update to have Bundler re-resolve all your dependencies. This should correctly lock builder to v2.1.2.

如果失败,您可以通过将构建器v2.1.2添加到您的<$ c中来强制构建器$ c> Gemfile :

Failing that, you can force builder v2.1.2 by adding it to your Gemfile:

gem `builder`, `~> 2.1.2'

然后运行捆绑更新生成器。这应该在您的 Gemfile.lock 中添加v2.1.2,这对于Cucumber来说应该可以正常工作(只需要> = 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).

请参见Yehuda Katz最近在宝石版本控制和Bundler 的更多细节。

See Yehuda Katz's recent blog post on Gem versioning and Bundler for a bit more detail.

这篇关于Rails捆绑包,宝石冲突,解决它的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆