We really like Debian and we usually use the current “stable” distribution for our production servers.
It all works great with one little problem: if you need very current soft it is probably not in the ‘stable’ yet.
The current Debian stable (“etch”) includes rubygems 0.9.0-5 which is way too old.
We needed to upgrade to at least 1.2.
There are several ways you can try to solve such a problem. For example there are backports of selected packages from testing/unstable. Or you can compile sources yourself, which is less trivial but will help when binary backport is not available.
We are going to download sources for the newer package that is in the unstable (“sid”) distribution and compile them on the stable distribution.
The procedure is simple:
- add ‘deb-src http://http.us.debian.org/debian sid main non-free contrib’ to your /etc/apt/sources.list
- run
apt-get update
- run
apt-get source rubygems
cd libgems-ruby-1.2.0
- The unstable package has options to build rubygems1.9 as well as rubygems1.8. so it requires ruby1.9 to be installed.
- edit debian/control and remove dependencies for ruby1.9 and the whole section for “Package: rubygems1.9”
- run
dpkg-buildpackage -b -uc
cd ..
Now you have rubygems*.deb packages.
First remove old packages:
apt-get remove libgems-ruby1.8 rubygems
Then install the new packages:
dpkg -i rubygems*.deb