On 24/05/11 at 16:11 -0700, brettg wrote: > On 05/24/2011 02:26 PM, Lucas Nussbaum wrote: > > Using alternatives to switch between Ruby implementations > >========================================================= > >The alternatives system is now used to manage the "ruby" symlink and the > >other related symlinks, making it easy to switch between Ruby > >implementations (only Ruby 1.8 and 1.9.X at the moment). The default > >choice for Ruby is still 1.8, but this change will make it easy for us > >to make a switch to 1.9.X by default (likely by the release of Debian > >wheezy). > > > > > How is this being managed, I only review debian-ruby a few times a > month to see major changes and I hadn't noticed this.
*** lucas@beothuk:~$ sudo update-alternatives --display ruby ruby - auto mode link currently points to /usr/bin/ruby1.8 /usr/bin/ruby1.8 - priority 50 slave erb: /usr/bin/erb1.8 slave erb.1.gz: /usr/share/man/man1/erb1.8.1.gz slave irb: /usr/bin/irb1.8 slave irb.1.gz: /usr/share/man/man1/irb1.8.1.gz slave rdoc: /usr/bin/rdoc1.8 slave rdoc.1.gz: /usr/share/man/man1/rdoc1.8.1.gz slave ri: /usr/bin/ri1.8 slave ri.1.gz: /usr/share/man/man1/ri1.8.1.gz slave ruby.1.gz: /usr/share/man/man1/ruby1.8.1.gz slave testrb: /usr/bin/testrb1.8 slave testrb.1.gz: /usr/share/man/man1/testrb1.8.1.gz /usr/bin/ruby1.9.1 - priority 10 slave erb: /usr/bin/erb1.9.1 slave erb.1.gz: /usr/share/man/man1/erb1.9.1.1.gz slave irb: /usr/bin/irb1.9.1 slave irb.1.gz: /usr/share/man/man1/irb1.9.1.1.gz slave rdoc: /usr/bin/rdoc1.9.1 slave rdoc.1.gz: /usr/share/man/man1/rdoc1.9.1.1.gz slave ri: /usr/bin/ri1.9.1 slave ri.1.gz: /usr/share/man/man1/ri1.9.1.1.gz slave ruby.1.gz: /usr/share/man/man1/ruby1.9.1.1.gz slave testrb: /usr/bin/testrb1.9.1 slave testrb.1.gz: /usr/share/man/man1/testrb1.9.1.1.gz Current 'best' version is '/usr/bin/ruby1.8'. *** lucas@beothuk:~$ sudo update-alternatives --set ruby /usr/bin/ruby1.9.1 update-alternatives: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in manual mode. *** lucas@beothuk:~$ ruby --version ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] *** lucas@beothuk:~$ sudo update-alternatives --set ruby /usr/bin/ruby1.8 update-alternatives: using /usr/bin/ruby1.8 to provide /usr/bin/ruby (ruby) in manual mode. *** lucas@beothuk:~$ ruby --version ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux] Rubygems has its own alternatives set: *** lucas@beothuk:~$ sudo update-alternatives --display gem gem - auto mode link currently points to /usr/bin/gem1.8 /usr/bin/gem1.8 - priority 180 slave bash_completion_gem: /etc/bash_completion.d/gem1.8 slave gem.1.gz: /usr/share/man/man1/gem1.8.1.gz /usr/bin/gem1.9.1 - priority 10 slave bash_completion_gem: /etc/bash_completion.d/gem1.9.1 slave gem.1.gz: /usr/share/man/man1/gem1.9.1.1.gz Current 'best' version is '/usr/bin/gem1.8'. That's because it's not possible to have alternatives that span over different packages, unfortunately. - Lucas -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

