开发者

Gem dependency issues

开发者 https://www.devze.com 2023-01-18 16:38 出处:网络
Let us say there are two gems A ( depends on gem C version 2) B ( depends on gem C version 1) My rails application requires gem A, and B.

Let us say there are two gems

A ( depends on gem C version 2)
B ( depends on gem C version 1)

My rails application requires gem A, and B.

How do you handle the collision of two versions o开发者_Python百科f the gem C while loading A and B.


Honestly? I contact B's author and try to help them patch up to version 2 of C. I know that's not a good answer, but I've not found a way to use two different versions of the same gem in the same environment. And even if there were, I'm not sure it's sane to do so. :(


You don't. RubyGems can install multiple versions of the same Gem, but it only can ever activate one. That's one of the reasons why Bundler was created: it will at least check for such an incompatibility before you run the app.

0

精彩评论

暂无评论...
验证码 换一张
取 消