[Rubygems-developers] Repackaging a Gem for other Package Managers (e.g. RPM, deb, conary, etc.)

Austin Ziegler halostatue at gmail.com
Wed Jan 31 16:39:14 EST 2007

On 1/24/07, Scott Parkerson <scott.parkerson at gmail.com> wrote:
> I'm trying to come up with a relatively good way to take a Gem and
> re-package its contents for other package managers. I've seen a
> Gem2Spec tool for converting Gems to RPM spec filesout there, but
> would like to dig a little deeper. My specific area of interest is
> Conary, which is *not* a household name (yet).

I don't think that your proposal is a good idea, even if your
operating system supports (demands) it. One of the fundamental
features of RubyGems is that multiple versions can exist side-by-side,
even if those versions are otherwise incompatible, and users can
specifically force a version (e.g., "gem '=1.2.3'"). When you subvert
the RubyGems structure, you *will* break the expectations of people
who expect "gem" (previously "require_gem") to work.

This matters because individual applications in Rails can be fixed to
specific versions of Rails.

Trying to change this *will* piss people off at your distribution's
support of Ruby and will encourage them to ignore the hard work you're
doing and build Ruby themselves.

Your best bet is to *use* RubyGems and simply wrap a gem in your
package manager's format. RubyGems installations are non-destructive
and can be rolled back without any problems since they're *always* in
a new directory. I know that there are Rails applications I have used
in the last few weeks that fix themselves on a specific version of
Rails, because they're theoretically *incompatible* with later

FWIW, the "gem" method can also do '~>1.3.1' which means that any
version including and after 1.3.1 up to but not including 1.4 will be
acceptable for the program.

This *is* different than Perl package managers. This *is* different
than Python package managers. This is one of the things that I think
that makes RubyGems good.

Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/
               * austin at halostatue.ca * http://www.halostatue.ca/feed/
               * austin at zieglers.ca

More information about the Rubygems-developers mailing list