I had a look at your implementation and it looks interesting. However I
wonder if the usage of the update-alternative system is necessary as it
brings additional complexity (as already pointed by Lucas above).

Another option would be to simply force symlink binaries from
/var/lib/ruby1.*/bin/ to /usr/local/bin/, that way the last installed
gem always wins.

The main point being that the gem command should installed everything in
/usr/local/ - it can be considered as a program installed by the local
administrator. It should not touch anything in /usr (which is reserved
for dpkg).

So rather than trying to figure out ways to make dpkg and gem know about
each other, it seems easier to make sure that they won't interfere (dpkg
works in /usr, gem in /usr/local).

If you think that update-alternatives is still worth using, I'd suggest
you use the --altdir and --admindir options, so that you don't step on
the update-alternatives system configuration (using
/usr/local/etc/gems/alternatives and /usr/local/lib/gems/alternatives
respectively). Going down that road, it may also be useful to extend the
gem command to provide a way to switch from one alternative to the other
so the end user won't have to learn about the update-alternative system.

-- 
Add rubygems bin to PATH
https://bugs.launchpad.net/bugs/145267
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to