# Ruby18 vs. ruby

**URL:** <https://rubytalk.org/t/ruby18-vs-ruby/36424>\
**Category:** ruby-talk\
**Created:** [25 March 2007 02:58 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424 "2007-03-25T02:58:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meino\_Christian\_Cra1](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Meino\_Christian\_Cra1](https://rubytalk.org/u/Meino_Christian_Cra1)\
**Post date:** [25 March 2007 02:58 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/1 "2007-03-25T02:58:50Z")

</div>

Hi,

I am using the ruby-stable-snapshot on a more or less regualr basis  
on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
mechanism.

Suddenly all my ruby scripts stops to work. 🙂

I noticed, that ruby was not installed as "ruby" but as "ruby18".  
My script's hash-bangs always are "#! /usr/bin/ruby".

How can I convince configure to install ruby as ruby?

I tried to set an environment variable "RUBY\_INSTALL\_NAME" but it  
does not work (yes, it was "exported" 🙂

Thank you very much for any help in advance!

Kind regards,  
mcc

PS: May be it would be an idea to name the archive on rubys  
ftp-server like its contents:  
snapshot.tgz ---\> ruby-snapshot.tgz  
stable-snapshot.tgz ---\> ruby-stable-snapshot.tgz

...one (at least me 😉 downloads a LOT of snapshots, source archives  
and so on. If not unpacked, configured,compiled, installed  
right directly after download - it is confusing to have archives  
"without name" like: source.tgz, stable-source.tgz, archive.zip,  
my\_distro.7z,.....

"That's four small chars for a ftp-server, one giant leap for rubykind." 🙂

> **···**
>
> --  
> Please don't send me any Word- or Powerpoint-Attachments  
> unless it's absolutely neccessary. - Send simply Text.  
> See [http://www.gnu.org/philosophy/no-word-attachments.html](http://www.gnu.org/philosophy/no-word-attachments.html)  
> In a world without fences and walls nobody needs gates and windows.

---

<div class="post-metadata">

**Author:** ![\_r\_n\_2](https://avatars.discourse-cdn.com/v4/letter/_/9dc877/32.png) [@\_r\_n\_2](https://rubytalk.org/u/_r_n_2)\
**Post date:** [25 March 2007 04:00 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/2 "2007-03-25T04:00:23Z")

</div>

Can simply create a symbolic link called ruby that points to ruby18 as  
follows:  
ln -s /usr/bin/ruby18 /usr/bin/ruby

> **···**
>
> On Mar 24, 10:58 pm, meino.cra...@gmx.de wrote:
> 
> > Hi,
> > 
> > I am using the ruby-stable-snapshot on a more or less regualr basis  
> > on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
> > mechanism.
> > 
> > Suddenly all my ruby scripts stops to work. 🙂
> > 
> > I noticed, that ruby was not installed as "ruby" but as "ruby18".  
> > My script's hash-bangs always are "#! /usr/bin/ruby".
> > 
> > How can I convince configure to install ruby as ruby?
> > 
> > I tried to set an environment variable "RUBY\_INSTALL\_NAME" but it  
> > does not work (yes, it was "exported" 🙂
> > 
> > Thank you very much for any help in advance!
> > 
> > Kind regards,  
> > mcc
> > 
> > PS: May be it would be an idea to name the archive on rubys  
> > ftp-server like its contents:  
> > snapshot.tgz ---\> ruby-snapshot.tgz  
> > stable-snapshot.tgz ---\> ruby-stable-snapshot.tgz
> > 
> > ...one (at least me 😉 downloads a LOT of snapshots, source archives  
> > and so on. If not unpacked, configured,compiled, installed  
> > right directly after download - it is confusing to have archives  
> > "without name" like: source.tgz, stable-source.tgz, archive.zip,  
> > my\_distro.7z,.....
> > 
> > "That's four small chars for a ftp-server, one giant leap for rubykind." 🙂
> > 
> > --  
> > Please don't send me any Word- or Powerpoint-Attachments  
> > unless it's absolutely neccessary. - Send simply Text.  
> > Seehttp://www.gnu.org/philosophy/no-word-attachments.html  
> > In a world without fences and walls nobody needs gates and windows.

---

<div class="post-metadata">

**Author:** ![M\_Edward\_Ed\_Borasky1](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@M\_Edward\_Ed\_Borasky1](https://rubytalk.org/u/M_Edward_Ed_Borasky1)\
**Post date:** [25 March 2007 05:00 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/3 "2007-03-25T05:00:20Z")

</div>

I run Gentoo Linux, but I use the Ruby from Portage. If you keyword it in "/etc/portage/package.keywords", you'll get a fairly recent Ruby. For example, Ruby 1.8.6 showed up in Portage only a day or so after the upstream release.

But if you want to use Ruby snapshots as your main Ruby, there's a couple of things you can do:

1. When you do the "./configure", the \*default\* is to install in "/usr/local". However, if you use  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/usr

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;it will switch to /usr, so everything will end up in the same place a regular "emerge ruby" would show up.

2. I've never used this, but a number of Ruby scripts I've looked at start with

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#! /usr/env/ruby

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;which by some magic knows where to find the Ruby interpreter.

3. As someone pointed out, after you do the install, you should be able to go into /usr/bin (or /usr/local/bin, if you didn't use a --prefix on your configure) and do

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s ruby18 ruby

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;However, I think the "make install" does that.

4. If you did the default install, change all your scripts to

&nbsp;&nbsp;&nbsp;&nbsp;#! /usr/local/bin/ruby

5. Don't forget -- if you're installing other things from Portage that have Ruby as a dependency, you'll need to tell Portage that you've installed Ruby. Otherwise, it will download and install Ruby from Portage. To do this, you'll need to add a line to /etc/portage/package.provided that says

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=ruby-1.8.6

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or whatever the current release of Ruby is in Portage. Do "emerge -pv ruby" and it will tell you the current version.

> **···**
>
> meino.cramer@gmx.de wrote:
> 
> > Hi,
> > 
> > I am using the ruby-stable-snapshot on a more or less regualr basis  
> > on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
> > mechanism.
> > 
> > Suddenly all my ruby scripts stops to work. 🙂
> > 
> > I noticed, that ruby was not installed as "ruby" but as "ruby18".  
> > My script's hash-bangs always are "#! /usr/bin/ruby".  
> > &nbsp;&nbsp;
> 
> --  
> M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)  
> [http://borasky-research.blogspot.com/](http://borasky-research.blogspot.com/)
> 
> If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

---

<div class="post-metadata">

**Author:** ![Meino\_Christian\_Cra1](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Meino\_Christian\_Cra1](https://rubytalk.org/u/Meino_Christian_Cra1)\
**Post date:** [25 March 2007 04:09 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/4 "2007-03-25T04:09:59Z")

</div>

ranx \<perl2ruby@gmail.com\> [07-03-25 06:02]:

> \> Hi,  
> \>  
> \> I am using the ruby-stable-snapshot on a more or less regualr basis  
> \> on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
> \> mechanism.  
> \>  
> \> Suddenly all my ruby scripts stops to work. 🙂  
> \>  
> \> I noticed, that ruby was not installed as "ruby" but as "ruby18".  
> \> My script's hash-bangs always are "#! /usr/bin/ruby".  
> \>  
> \> How can I convince configure to install ruby as ruby?  
> \>  
> \> I tried to set an environment variable "RUBY\_INSTALL\_NAME" but it  
> \> does not work (yes, it was "exported" 🙂  
> \>  
> \> Thank you very much for any help in advance!  
> \>  
> \> Kind regards,  
> \> mcc  
> \>  
> \> PS: May be it would be an idea to name the archive on rubys  
> \> ftp-server like its contents:  
> \> snapshot.tgz ---\> ruby-snapshot.tgz  
> \> stable-snapshot.tgz ---\> ruby-stable-snapshot.tgz  
> \>  
> \> ...one (at least me 😉 downloads a LOT of snapshots, source archives  
> \> and so on. If not unpacked, configured,compiled, installed  
> \> right directly after download - it is confusing to have archives  
> \> "without name" like: source.tgz, stable-source.tgz, archive.zip,  
> \> my\_distro.7z,.....  
> \>  
> \> "That's four small chars for a ftp-server, one giant leap for rubykind." 🙂  
> \>  
> \> --  
> \> Please don't send me any Word- or Powerpoint-Attachments  
> \> unless it's absolutely neccessary. - Send simply Text.  
> \> Seehttp://www.gnu.org/philosophy/no-word-attachments.html  
> \> In a world without fences and walls nobody needs gates and windows.
> 
> Can simply create a symbolic link called ruby that points to ruby18 as  
> follows:  
> ln -s /usr/bin/ruby18 /usr/bin/ruby

Hi,

thanks for your reply, ranx...already know symlinks...being a UNIX  
freak since 14 years now... 😉

I wanted to install things correctly and dont "fix" problems by  
tweaking...otherwise other application/install may fail by finding  
"two" rubys...for example "RUBY\_INSTALL\_NAME" is used in the  
configure script at a lot of places. The libs also get their names  
from that. Symlinks will more harm than cure...

How can I convince rubys configure/install system to use "ruby"  
instead of "ruby18" ?

Keep scripting!  
mcc

> **···**
>
> > On Mar 24, 10:58 pm, meino.cra...@gmx.de wrote:
> 
> --  
> Please don't send me any Word- or Powerpoint-Attachments  
> unless it's absolutely neccessary. - Send simply Text.  
> See [We Can Put an End to Word Attachments - GNU Project - Free Software Foundation](http://www.gnu.org/philosophy/no-word-attachments.html)  
> In a world without fences and walls nobody needs gates and windows.

---

<div class="post-metadata">

**Author:** ![Meino\_Christian\_Cra1](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Meino\_Christian\_Cra1](https://rubytalk.org/u/Meino_Christian_Cra1)\
**Post date:** [25 March 2007 05:19 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/5 "2007-03-25T05:19:03Z")

</div>

M. Edward (Ed) Borasky \<znmeb@cesmail.net\> [07-03-25 07:01]:  
Hi Ed,

thanks for your reply.

My question was:

How can I convince the configure/install system of the ruby stable  
snapshot release to use

&nbsp;&nbsp;ruby

for RUBY\_INSTALL\_NAME instead of

&nbsp;&nbsp;ruby18

?

Thanks a lot for any helpful answer to my above question.

Kind regards,  
&nbsp;&nbsp;mcc

> **···**
>
> > meino.cramer@gmx.de wrote:
> 
> > \>Hi,  
> > \>  
> > \> I am using the ruby-stable-snapshot on a more or less regualr basis  
> > \> on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
> > \> mechanism.  
> > \>  
> > \> Suddenly all my ruby scripts stops to work. 🙂  
> > \>  
> > \> I noticed, that ruby was not installed as "ruby" but as "ruby18".  
> > \> My script's hash-bangs always are "#! /usr/bin/ruby".  
> > \>  
> > I run Gentoo Linux, but I use the Ruby from Portage. If you keyword it  
> > in "/etc/portage/package.keywords", you'll get a fairly recent Ruby.  
> > For example, Ruby 1.8.6 showed up in Portage only a day or so after the  
> > upstream release.
> > 
> > But if you want to use Ruby snapshots as your main Ruby, there's a  
> > couple of things you can do:
> > 
> > 1. When you do the "./configure", the \*default\* is to install in  
> > "/usr/local". However, if you use  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/usr
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;it will switch to /usr, so everything will end up in the same place  
> > a regular "emerge ruby" would show up.
> > 
> > 2. I've never used this, but a number of Ruby scripts I've looked at  
> > start with
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;#! /usr/env/ruby
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;which by some magic knows where to find the Ruby interpreter.
> > 
> > 3. As someone pointed out, after you do the install, you should be able  
> > to go into /usr/bin (or /usr/local/bin, if you didn't use a --prefix on  
> > your configure) and do
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;ln -s ruby18 ruby
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;However, I think the "make install" does that.
> > 
> > 4. If you did the default install, change all your scripts to
> > 
> > &nbsp;&nbsp;&nbsp;#! /usr/local/bin/ruby
> > 
> > 5. Don't forget -- if you're installing other things from Portage that  
> > have Ruby as a dependency, you'll need to tell Portage that you've  
> > installed Ruby. Otherwise, it will download and install Ruby from  
> > Portage. To do this, you'll need to add a line to  
> > /etc/portage/package.provided that says
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;=ruby-1.8.6
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;or whatever the current release of Ruby is in Portage. Do "emerge  
> > -pv ruby" and it will tell you the current version.
> > 
> > --  
> > M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)  
> > [http://borasky-research.blogspot.com/](http://borasky-research.blogspot.com/)
> > 
> > If God had meant for carrots to be eaten cooked, He would have given  
> > rabbits fire.
> 
> --  
> Please don't send me any Word- or Powerpoint-Attachments  
> unless it's absolutely neccessary. - Send simply Text.  
> See [http://www.gnu.org/philosophy/no-word-attachments.html](http://www.gnu.org/philosophy/no-word-attachments.html)  
> In a world without fences and walls nobody needs gates and windows.

---

<div class="post-metadata">

**Author:** ![James\_Britt](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@James\_Britt](https://rubytalk.org/u/James_Britt)\
**Post date:** [25 March 2007 07:57 UTC](https://rubytalk.org/t/ruby18-vs-ruby/36424/6 "2007-03-25T07:57:15Z")

</div>

The symlink is the best solution.  
It is equivalent to having two names.  
Paths will resolve to either name.  
you could also just rename it, but that is slightly less reliable than the symlink.

> **···**
>
> On Mar 25, 2007, at 2:19 PM, meino.cramer@gmx.de wrote:
> 
> > M. Edward (Ed) Borasky \<znmeb@cesmail.net\> [07-03-25 07:01]:
> > 
> > > meino.cramer@gmx.de wrote:
> > 
> > Hi Ed,
> > 
> > thanks for your reply.
> > 
> > My question was:
> > 
> > How can I convince the configure/install system of the ruby stable  
> > snapshot release to use
> > 
> > &nbsp;&nbsp;ruby
> > 
> > for RUBY\_INSTALL\_NAME instead of
> > 
> > &nbsp;&nbsp;ruby18
> > 
> > ?
> > 
> > Thanks a lot for any helpful answer to my above question.
> > 
> > Kind regards,  
> > &nbsp;&nbsp;mcc
> > 
> > > > Hi,
> > > > 
> > > > I am using the ruby-stable-snapshot on a more or less regualr basis  
> > > > on a Gentoo Linux system. I do not install ruby via Gentoo's emerge  
> > > > mechanism.
> > > > 
> > > > Suddenly all my ruby scripts stops to work. 🙂
> > > > 
> > > > I noticed, that ruby was not installed as "ruby" but as "ruby18".  
> > > > My script's hash-bangs always are "#! /usr/bin/ruby".
> > > 
> > > I run Gentoo Linux, but I use the Ruby from Portage. If you keyword it  
> > > in "/etc/portage/package.keywords", you'll get a fairly recent Ruby.  
> > > For example, Ruby 1.8.6 showed up in Portage only a day or so after the  
> > > upstream release.
> > > 
> > > But if you want to use Ruby snapshots as your main Ruby, there's a  
> > > couple of things you can do:
> > > 
> > > 1. When you do the "./configure", the \*default\* is to install in  
> > > "/usr/local". However, if you use  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/usr
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;it will switch to /usr, so everything will end up in the same place  
> > > a regular "emerge ruby" would show up.
> > > 
> > > 2. I've never used this, but a number of Ruby scripts I've looked at  
> > > start with
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;#! /usr/env/ruby
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;which by some magic knows where to find the Ruby interpreter.
> > > 
> > > 3. As someone pointed out, after you do the install, you should be able  
> > > to go into /usr/bin (or /usr/local/bin, if you didn't use a --prefix on  
> > > your configure) and do
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;ln -s ruby18 ruby
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;However, I think the "make install" does that.
> > > 
> > > 4. If you did the default install, change all your scripts to
> > > 
> > > &nbsp;&nbsp;&nbsp;#! /usr/local/bin/ruby
> > > 
> > > 5. Don't forget -- if you're installing other things from Portage that  
> > > have Ruby as a dependency, you'll need to tell Portage that you've  
> > > installed Ruby. Otherwise, it will download and install Ruby from  
> > > Portage. To do this, you'll need to add a line to  
> > > /etc/portage/package.provided that says
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;=ruby-1.8.6
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;or whatever the current release of Ruby is in Portage. Do "emerge  
> > > -pv ruby" and it will tell you the current version.
> > > 
> > > --  
> > > M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)  
> > > [http://borasky-research.blogspot.com/](http://borasky-research.blogspot.com/)
> > > 
> > > If God had meant for carrots to be eaten cooked, He would have given  
> > > rabbits fire.
> > 
> > --  
> > Please don't send me any Word- or Powerpoint-Attachments  
> > unless it's absolutely neccessary. - Send simply Text.  
> > See [We Can Put an End to Word Attachments - GNU Project - Free Software Foundation](http://www.gnu.org/philosophy/no-word-attachments.html)  
> > In a world without fences and walls nobody needs gates and windows.
