/usr/bin/ruby should use the alternatives system

Bug #634703 reported by Victor Costan on 2010-09-10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ruby-defaults (Ubuntu)

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
ProcVersionSignature: Ubuntu 2.6.35-20.29-generic
Uname: Linux 2.6.35-20-generic x86_64
NonfreeKernelModules: wl nvidia
Architecture: amd64
Date: Fri Sep 10 01:46:40 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100906)
PackageArchitecture: all
SourcePackage: ruby-defaults

Victor Costan (costan) wrote :
Victor Costan (costan) wrote :

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

Lucas Nussbaum (lucas) wrote :

Fixed in version 4.7.

Changed in ruby-defaults (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers