5 ms·
Gems have the bizarre feature of allowing you to install multiple versions simultaneously. This is really hard to represent in a deb. :)
by duskwuff 16y ago
Gems have the bizarre feature of allowing you to install multiple versions simultaneously. This is really hard to represent in a deb. :)
- rbanffy 16y agoHow do you specify which version you want in your program?
- telemachos 16y agoBundler[1] is one way. [1] http://gembundler.com/rationale.html http://gembundler.com/rationale.html
- blasdel 16y agoThe naive way will just load the highest-numbered version you have installed: require 'rack' When you have rubygems loaded, this is equivalent to: gem 'rack', '>=0' You can specify exact and relative dependencies easily. There are a fuckton of frameworks to handle this for you, many of them oriented around copying the depended-upon gems into your app when it's deployed, as is common in the Java world.
- cmsj 16y agoWhy do people keep representing this as bizarre when C libraries parallel install just fine and you probably all have multiple versions of the same library installed right now? Accept it's a legitimate situation please. What it needs is radical change in languages like ruby/python/etc to resolve dependencies explicitly at runtime. Currently they hide the problem with import path priorities.
- regularfry 16y agoRubygems adds the gem() method, which allows you to specify at runtime which version of a dependency you want, and does not rely on path munging.
- duskwuff 16y ago(late, but replying anyway) Multiple versions of a library are certainly possible with C, but are generally avoided on Debian where possible. Where that isn't possible -- for instance, for libraries which completely changed their API like gtk1.4 -> gtk2, they simply create completely separate packages for the two versions. With gems, this isn't quite so easy, as there's no way to distinguish between a minor bugfix and a huge API-breaking change without either guessing based on the version number or having a human read the changelog. Even then, there's no guarantee that dependent packages will depend on distinct sets of versions.