Reputation: 64363
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 of the gem C while loading A and B.
Upvotes: 0
Views: 193
Reputation: 369458
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.
Upvotes: 0
Reputation: 4580
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. :(
Upvotes: 1