After seeing my last post, Michael Gorven pointed me to a couple of articles discussing RubyGem and Debian's policy. I did a bit of googling after reading those articles and some others around Ruby and package management systems, and found an article on using easy_install with Debian. That article recommends using Debian's unstable branch.
RubyGem's side of the story
The reason Rubygems and things like Python's easy_install exist is because each of those languages wants an operating system independent software repository to host packages for their libraries. This allows the packages to be updated as soon as a new release comes out, rather than having to wait 6 months or even 2 years for the next release of the operating system.
Debian's side of the story
However, the Debian guys are more interested in providing sysadmins with an easily maintainable operating system. This is why they developed applications like apt-get and why they stick to standards like the Filesystem Hierarchy Standard. Things like this help keep your operating system in a consistent and easily maintainable state.
So what's the problem?
Well, firstly, RubyGem doesn't conform to FHS when it installs ruby gem files. This means that when you use RubyGem to install a gem, it installs the gem to a non-standard location. And this means that you now have an extra package installed that your dpkg database doesn't know about, and your system is in an inconsistent state.
However, on the flip side of the coin, Debian doesn't have all the latest versions of all the gems. This means that you effectively cannot do your work or support your application.
The Best Solution
So, as far as I can see, the best solution would be for those gem developers to provide updated debian packages in an online repository so that you can simply apt-get install a gem. Then, when a new version of Debian is released, and you upgrade your system, the updated packages in the new stable repository will hopefully match or upgrade your installed packages.
Problems with the Solution
Developers, however, don't have the time or the resources to create packages for all the many different distributions of Linux and *BSD, and Mac OS X and Windows. This is why RubyGem was created, so provide an OS-independent distribution system. In addition to this, developers don't have the web space to upload packages for over 250 Linux distributions.
The third article referenced above suggests using the unstable branch of Debian. I'm not sure I'd want to do that on my server!
Ubuntu & easy_install
But what about Ubuntu? It doesn't have an unstable branch, and the versions of the packages I find are older than the versions I need. I looked through the -updates and -backports repositories, and they don't seem to have the latest versions either. It seems to me that the only option at this stage is to use easy_install.
I'm being very careful about it though. I install all the base tools and packages from apt-get. Then only those packages that are too old do I install via easy_install.
The Future?
Hopefully in the future the RubyGem and EasyInstall developers will get along better with the distro packagers and will get their packages installed to the correct locations. Perhaps someone can write a gem2deb or egg3deb utility that will ease the conversion of these packages.