El Domingo, 13 de Diciembre de 2009, Shot (Piotr Szotkowski) escribió: > Iñaki Baz Castillo: > > I suffer same issues. I've installed ruby 1.9.1 (installed from > > sources) under /usr/local. and ruby 1.8.7 (Debian package) under /usr. > > > > I compile ruby1.9 with these options: > > /configure --prefix=/usr/local/ --program-suffix=1.9 ; make ; make > > install so all its runnable files are sufixed by 1.9 (ruby1.9, gem1.9, > > irb1.9...). > > I think a much simpler solutions are to either (a) use rvm (which > doesn work for me for some reason) or (b) use my approach (below). > > I don use program suffixes, but rather use > > ./configure --prefix=/home/shot/opt/ruby-1.9.1-p376 > > (and similar, for example ~/opt/ruby-1.8.7-git when building 1.8.7 from > the repo latest 1.8.7 revision) plus ~/opt/ruby-1.8 and ~/opt/ruby-1.9 > symlinks poiting to the hand-compiled versions I want to use for my > development. I then have > > export PATH_ORIG="$PATH" > > at the end of my ~/.bashrc and > > alias r18='export PATH=/home/shot/opt/ruby-1.8/bin:$PATH_ORIG' > alias r19='export PATH=/home/shot/opt/ruby-1.9/bin:$PATH_ORIG' > > in my ~/.bash_aliases, and switching between Ruby 1.8 and 1.9 is as > quick as running 18and ¡Ær19¡Ç in the shell. I leave system-packaged > Ruby alone, if only so that ¡Ægem update --system¡Ç works sanely (and so > no sudo is required for any of my Ruby development whatsoever). > > Of course, if you want to have system-wide hand-compiled Ruby 1.8 and/or > 1.9, putting them in /opt (rather than ~/opt) might be more elegant. This is a very nice solution. However the problem is that I need ruby1.8 deb package isntalled in my system as many other packages require ruby1.8, and it is installed under /usr/ as usual. -- Iaki Baz Castillo <ibc / aliax.net>