BT

DebGem: Ruby Gems for Debian

by Mirko Stocker on Jan 13, 2009 |

On Linux systems, you usually manage all installed software via a package management system, like for example APT on Debian and Ubuntu or RedHat's RPM. On the other hand, many programming languages come with their own toolset for installing and updating software, like Ruby's Gems or Python's Eggs. This certainly makes sense on operating systems that don't provide the services of a package manager, but it also causes many inconveniences on Linux systems, because "it takes the control out of a system's standardized package manager", as free software developer Diego Pettenò writes and elaborates in detail.

Phusion, the company behind the Ruby Enterprise Edition and the Phusion Passenger (a.k.a. mod_rails), offers a solution for plagued system administrators by providing an APT repository for most Gems. Installing a Gem, for example RMagick, is as simple as typing apt-get install librmagick-ruby and it will get installed along with all dependencies such as libmagick10.

DebGem is currently in a free public beta period, but the plan is to charge for the service once the packages are of good enough quality. We talked to Hongli Lai and Ninh Bui from Phusion to learn more about how DebGem works:

We can tell you that the process is partially automated. This is not surprising because we're programmers. It took quite some effort to write an automated conversion system. However, not everything can be automated (not all gems can be converted cleanly) so we have to specify exceptions by hand. Discovering these exceptions as well as testing is also done by hand. We are armed with an army of virtual machines in order to compile for and test on various distributions and platforms. Because there are so many gems (approximately 25000) a full conversion process typically takes several hours even if we parallelize the process with multiple machines. Uploading the resulting packages to a server takes several hours. All in all, it's non-trivial and requires time, care and constant maintenance.

Are there any plans to support other package managers? 

At this moment we have no plans to support other package management systems, but we may reconsider if enough people express demand for it.

Is there any relation between DebGem and the Ruby Enterprise Edition?

DebGem has no relation to Ruby Enterprise Edition, although one of our long-term plans is to provide DebGem packages compiled against REE. There are various reasons why this is non-trivial, which is why we haven't done it already.

So while DebGem isn't a solution for the underlying problem, it seems to be a very nice workaround and might make administrators happy. To learn more, visit the DebGem website or take a look at their FAQ.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Hmm... by Mika H

If you use Debian 5.0 Lenny, which will be released soon, then I don't think you need any external repository. librmagick-ruby was used as an example in the article. You can install it along with all dependencies such as libmagick10 diretly from the official Debian repository using apt-get:

# apt-get intall librmagick-ruby

So I don't see much point of using external repository which might even became commercial. Only if you want to have ruby 1.9 and are ready to pay for the packages then you might want to use that external repository, If ruby 1.8 is ok for you then you get all from Debian repository.

Re: Hmm... by Mika H

typofix:

# apt-get install librmagick-ruby

Re: Hmm... by Mika H

This is from the RubyGem page:

"A paid subscription allows you access to over 25,000 Debian packaged gems".

Wekk, okey it's possible that lots of of the gems are not in the Debian repository. I don't know, I'm not a Ruby developer.

Re: Hmm... by Adam Meehan

Its more that the gems get updated quite frequently in many cases, and the package repositories don't nearly keep up. So if you need a new release with a bug fix or feature, without a service like DebGem, you have to use the rubygems to manage them.

Re: Hmm... by Gaveen Prabhasara

As a matter of fact, it's going to be a commercial repository. I also don't feel like using a subscription-based paid repository, although I agree it has it's conveniences.

Certain Ruby packages have respective deb/rpm packages, but they are not kept updated (a common example would be rails). Even if there's updates, some packages don't manage into the native package management repositories at all. Then there's the case where some gems have dependencies from the native packages (Eg: RMagick). So there's an advantage of using an external repository.

However I don't see why I should pay for this service when I have RubyGems and is perfectly happy dealing with it.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

5 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT