/usr/bin/ruby should use the alternatives system

Bug #634703 reported by Victor Costan
10
This bug affects 2 people
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
ProcVersionSignature: Ubuntu 2.6.35-20.29-generic 2.6.35.4
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
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ruby-defaults

Revision history for this message
Victor Costan (costan) wrote :
Revision history for this message
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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.