From: "Shot (Piotr Szotkowski)" Date: 2009-12-13T11:21:20+09:00 Subject: Re: Is it possible to force a Ruby program to run as a proc name different than "ruby"? --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I=C3=B1aki 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=3D/usr/local/ --program-suffix=3D1.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=E2=80=99t work for me for some reason) or (b) use my approach (below). I don=E2=80=99t use program suffixes, but rather use =2E/configure --prefix=3D/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=E2=80=99s latest 1.8.7 revision) plus ~/opt/ruby-1.8 and ~/opt/rub= y-1.9 symlinks poiting to the hand-compiled versions I want to use for my development. I then have export PATH_ORIG=3D"$PATH" at the end of my ~/.bashrc and alias r18=3D'export PATH=3D/home/shot/opt/ruby-1.8/bin:$PATH_ORIG' alias r19=3D'export PATH=3D/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 =E2=80=98r18=E2=80=99 and =E2=80=98r19=E2=80=99 in the she= ll. I leave system-packaged Ruby alone, if only so that =E2=80=98gem update --system=E2=80=99 works san= ely (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. =E2=80=94 Shot --=20 We don=E2=80=99t think of ourselves as being perfectionists, really. To us it=E2=80=99s more about desperately trying to have it sound more or less OK. [Donald Fagen] --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkskT00ACgkQi/mCfdEo8UqlcQCfVFSNMOGWMDjyrf1hX95T5xqv ClcAnjvgW23mxyMLZEYCW3dWv/WaFJOb =ICOD -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--