Satya's blog - Apt and Gem

Oct 14 2009 10:20 Apt and Gem

If you use Ubuntu and Rails, you may have run across this already: the apt system and the gem system will fight like cats, or as someone called ReinH put it, like Kirk and Spock in Amok Time.

To use ruby stuff, install the ruby packages like "ruby", and rubygems only. Then install all other ruby stuff using the gem command. Slight problem, on 9.10 you get these:

rubygems - package management framework for Ruby libraries/applications
rubygems-doc - package management framework for Ruby libraries/applications
rubygems1.8 - package management framework for Ruby libraries/applications
rubygems1.9 - package management framework for Ruby libraries/applications
rubygems1.9.1 - package management framework for Ruby libraries/applications

Old Ubuntu hands will know that the 'rubygems' package should install the "best" rubygems<version> package. Nope.

The main problem is that gems, and the ruby world in general, make it hard to twist into the mind-space of apt-based systems. See http://pkg-ruby-extras.alioth.debian.org/rubygems.html for more than you ever want to know about this stuff. In short, all Rails apps want to be in one directory, and all Debian-based ssytems want you config in /etc, your code in /usr/local (or whatever), etc. and that's just not compatible with what Rails likes. And the Ruby/Rails people don't see the problem.

Tag: ruby rails