/usr/bin/ruby should use the alternatives system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ruby-defaults (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
ruby1.8, ruby1.9, and ruby1.9.1 should set up their binaries using Debian's alternatives system, so I can easily choose which one I want. Ideally, the choices for related binaries (rubygems and irb) would be linked to the choice of ruby.
I am interested in this change because I would like to use ruby 1.9.2 (available as ruby1.9.1) for much of my development work, and I'd like to switch to it on my production servers. Of course, all these systems run on Ubuntu.
Thank you!
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ruby 4.5
ProcVersionSign
Uname: Linux 2.6.35-20-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Fri Sep 10 01:46:40 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100906)
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ruby-defaults
The commands below roughly express what I want. They seem to work for my system.
# Rubygems seems to set up its own alternatives, but switching between gem1.8 and gem1.9.1 didn't switch the ruby interpreter.
sudo update-alternatives --remove-all gem
# 1.8 -> 1.8.7
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 5 --slave /usr/bin/gem rubygems /usr/bin/gem1.8 --slave /usr/bin/irb irb /usr/bin/irb1.8
# 1.9 -> 1.9.2
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 10 --slave /usr/bin/gem rubygems /usr/bin/gem1.9.1 --slave /usr/bin/irb irb /usr/bin/irb1.9.1