# Install.rb

**URL:** <https://rubytalk.org/t/install-rb/3329>\
**Category:** ruby-talk\
**Created:** [5 December 2002 13:09 UTC](https://rubytalk.org/t/install-rb/3329 "2002-12-05T13:09:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Carrera](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Daniel\_Carrera](https://rubytalk.org/u/Daniel_Carrera)\
**Post date:** [5 December 2002 13:09 UTC](https://rubytalk.org/t/install-rb/3329/1 "2002-12-05T13:09:24Z")

</div>

Could someone tell me how the Ruby ‘install.rb’ scripts work?

I’m finding that trying to install ruby modules is a very frustrating  
experience. Why can’t it be nice and easy like Perl? In Perl is always a  
simple:

perl [Makefile.PL](http://Makefile.PL)  
make  
make install

Nice, easy, quick and never fails.

In Ruby I really can’t get the ‘install.rb’ script to work. The library  
doesn’t come with an INSTALL file, like everyone else, and the README file  
contains no install observation. After a while I find that there is a  
file in /doc/ directory written in HTML (so I have to go start Netscape  
just to read information that could just as well be transmitted in plain  
text). When I get there, I find that the information is simply wrong.  
It’s telling me to use flags which the install.rb script claims not to  
understand.

I love Ruby, but this _one_ thing about it really pisses me off. I have  
never seen anything to difficult to install.

If I were to remake the way Ruby modules are installed, this is what I  
would change (from first to last):

1. Add an INSTALL file with install information.
2. Make the ‘install.rb’ scripts behave in a consistent manner.
3. Make them simpler to use.

Could someone please tell me how you use those ‘install.rb’ scrits?

I want to install FXRuby. I have the Fox library in $HOME/lib and the  
includes in $HOME/include/fox.

I would think that:

ruby install.rb config --prefix=$HOME

would work, but it doesn’t. It’s not making a Makefile.

Any help would be most welcome.

Daniel.

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [5 December 2002 13:17 UTC](https://rubytalk.org/t/install-rb/3329/2 "2002-12-05T13:17:10Z")

</div>

> perl Makefile.PL  
> make  
> make install

For an extension

&nbsp;&nbsp;&nbsp;ruby extconf.rb  
&nbsp;&nbsp;&nbsp;make  
&nbsp;&nbsp;&nbsp;make install

> Could someone please tell me how you use those 'install.rb' scrits?

&nbsp;&nbsp;&nbsp;ruby install.rb config  
&nbsp;&nbsp;&nbsp;ruby install.rb setup  
&nbsp;&nbsp;&nbsp;ruby install.rb install

> I want to install FXRuby. I have the Fox library in $HOME/lib and the  
> includes in $HOME/include/fox.

This is documented in doc/build.html, the example is

&nbsp;&nbsp;&nbsp;ruby install.rb config -- \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--with-fox-include=/home/lyle/fox-1.0.11/include \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--with-fox-lib=/home/lyle/fox-1.0.11/src/.libs

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Daniel\_Carrera](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Daniel\_Carrera](https://rubytalk.org/u/Daniel_Carrera)\
**Post date:** [5 December 2002 13:21 UTC](https://rubytalk.org/t/install-rb/3329/3 "2002-12-05T13:21:59Z")

</div>

> > Could someone please tell me how you use those ‘install.rb’ scrits?
> 
> ruby install.rb config  
> ruby install.rb setup  
> ruby install.rb install

Half my frustration comes from the fact that this didn’t work.

> > I want to install FXRuby. I have the Fox library in $HOME/lib and the  
> > includes in $HOME/include/fox.
> 
> This is documented in doc/build.html, the example is
> 
> ruby install.rb config –   
> –with-fox-include=/home/lyle/fox-1.0.11/include   
> –with-fox-lib=/home/lyle/fox-1.0.11/src/.libs

The other half of my frustration comes from the fact that this didn’t work  
either. The install.rb script doesn’t even accept these flags.

Thanks for trying to help.

Daniel.

---

<div class="post-metadata">

**Author:** ![Daniel\_Carrera](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Daniel\_Carrera](https://rubytalk.org/u/Daniel_Carrera)\
**Post date:** [5 December 2002 13:27 UTC](https://rubytalk.org/t/install-rb/3329/4 "2002-12-05T13:27:35Z")

</div>

> > I want to install FXRuby. I have the Fox library in $HOME/lib and the  
> > includes in $HOME/include/fox.
> 
> This is documented in doc/build.html, the example is
> 
> ruby install.rb config –   
> –with-fox-include=/home/lyle/fox-1.0.11/include   
> –with-fox-lib=/home/lyle/fox-1.0.11/src/.libs

Correction.  
I failed to include the ‘–’, which is why it looked to me like the  
instructions were wrong.  
I still think that this is unduly difficult for a scripting language.

But thank you very much for helping. I appreciate it.

I still hope to see some of the changes in my wish list.

Daniel.

---

<div class="post-metadata">

**Author:** ![Anders\_Bengtsson](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@Anders\_Bengtsson](https://rubytalk.org/u/Anders_Bengtsson)\
**Post date:** [5 December 2002 15:05 UTC](https://rubytalk.org/t/install-rb/3329/5 "2002-12-05T15:05:35Z")

</div>

> ruby install.rb config  
> ruby install.rb setup  
> ruby install.rb install

I’ll have to join Daniel Carrera in complaining. What is really the  
point of this multi-step procedure?

- Of all the packages using it, how many even _need_ configuration?
- Why the middle step with setup, can’t this be done in either config or  
install?
- The required order of these steps is not obvious to the user.
- When they break I’ve found it hard to find out why.

I think these install scripts are the only Ruby-related thing I have so  
far cursed out loud at while using. 🙂

/Anders

> **···**
>
> –
> 
> A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se  
> Stockholm, Sweden |
> 
> * * *
> 
> Gratis e-mail resten av livet på www.yahoo.se/mail  
> Busenkelt!

---

<div class="post-metadata">

**Author:** ![Mauricio\_Fernndez](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Mauricio\_Fernndez](https://rubytalk.org/u/Mauricio_Fernndez)\
**Post date:** [5 December 2002 14:33 UTC](https://rubytalk.org/t/install-rb/3329/6 "2002-12-05T14:33:37Z")

</div>

> > > Could someone please tell me how you use those ‘install.rb’ scrits?
> > 
> > ruby install.rb config  
> > ruby install.rb setup  
> > ruby install.rb install
> 
> Half my frustration comes from the fact that this didn’t work.
> 
> > > I want to install FXRuby. I have the Fox library in $HOME/lib and the  
> > > includes in $HOME/include/fox.
> > 
> > This is documented in doc/build.html, the example is
> > 
> > ruby install.rb config –   
> > –with-fox-include=/home/lyle/fox-1.0.11/include   
> > –with-fox-lib=/home/lyle/fox-1.0.11/src/.libs
> 
> The other half of my frustration comes from the fact that this didn’t work  
> either. The install.rb script doesn’t even accept these flags.

It should work. Perhaps you lack some library required for development,  
or the headers.  
For instance, in Debian you’d need the ruby-dev package.

Could you post the error messages you’re getting?

> **···**
>
> On Thu, Dec 05, 2002 at 10:21:59PM +0900, Daniel Carrera wrote:
> 
> > Thanks for trying to help.
> > 
> > Daniel.
> 
> –  
> \_ \_
> 
> > > \_\_ \_\_ _| |_ \_\_\_ \_ \_\_ \_\_\_ \_\_ \_ \_ \_\_  
> > > '\_ \ / _`| __/__ | '_` \_ \ / ` | ’ \   
> > > ) | (| | |_\_\_ \ | | | | | (_| | | | |  
> > > .\_\_/ \_,_|\ __|__ /| |_| |_|\__,_|_| |\_|  
> > > Running Debian GNU/Linux Sid (unstable)  
> > > batsman dot geo at yahoo dot com
> 
> ‘Ooohh… “FreeBSD is faster over loopback, when compared to Linux  
> over the wire”. Film at 11.’  
> – Linus Torvalds

---

<div class="post-metadata">

**Author:** ![Lyle\_Johnson6](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lyle\_Johnson6](https://rubytalk.org/u/Lyle_Johnson6)\
**Post date:** [5 December 2002 17:34 UTC](https://rubytalk.org/t/install-rb/3329/7 "2002-12-05T17:34:36Z")

</div>

Daniel Carrera wrote:

> Correction.  
> I failed to include the ‘–’, which is why it looked to me like the  
> instructions were wrong.  
> I still think that this is unduly difficult for a scripting language.

There is no “official” procedure for building Ruby packages that include  
both an extension module part (which is usually built using an  
extconf.rb script) and regular Ruby scripts. Minero Aoki’s “setup.rb”  
script – which FXRuby uses, and which can be found in the RAA – is the  
closest thing I’ve found. If a better solution emerges from the mists I  
would certainly consider it.

I too like Perl’s MakeMaker approach, but an objection that some people  
have is that it creates a Makefile and ergo assumes that the user has  
“make” on his system. This is not an issue for me personally; I never  
leave home without “make”. But I remember that this is why Python’s  
Distutils module is entirely Python-driven and does _not_ assume the  
presence of a “make” program.

P.S.

Your point is well taken about there not being a plain-text INSTALL file  
in the top-level FXRuby source directory. I’ll add one for the next release.

---

<div class="post-metadata">

**Author:** ![Ptkwt1](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@Ptkwt1](https://rubytalk.org/u/Ptkwt1)\
**Post date:** [5 December 2002 18:55 UTC](https://rubytalk.org/t/install-rb/3329/8 "2002-12-05T18:55:03Z")

</div>

In article [1039100729.1115.34.camel@spinoza](mailto:1039100729.1115.34.camel@spinoza),

> > ruby install.rb config  
> > ruby install.rb setup  
> > ruby install.rb install
> 
> I’ll have to join Daniel Carrera in complaining. What is really the  
> point of this multi-step procedure?

Exactly my gripe as well! Why can’t the install script do the  
config, setup, install itself so we only have to run one command instead  
of three?

> - Of all the packages using it, how many even _need_ configuration?
> - Why the middle step with setup, can’t this be done in either config or  
> install?
> - The required order of these steps is not obvious to the user.
> - When they break I’ve found it hard to find out why.
> 
> I think these install scripts are the only Ruby-related thing I have so  
> far cursed out loud at while using. 🙂

Add to this the fact that a lot of folks roll their own install.rb script  
that does things a little differently which compounds the problem. I  
think we need a more ‘standardized’ install methodology and whatever  
approach is chosen should be included in the standard Ruby installation.  
(currently you have to download setup.rb/install.rb from the RAA)

Phil

> **···**
>
> ## Anders Bengtsson [ndrsbngtssn@yahoo.se](mailto:ndrsbngtssn@yahoo.se) wrote:
> 
> “Or perhaps the truth is less interesting than the facts?”  
> Amy Weiss (accusing [theregister.co.uk](http://theregister.co.uk) of engaging in ‘tabloid journalism’)  
> Senior VP, Communications  
> Recording Industry Association of America

---

<div class="post-metadata">

**Author:** ![Minero\_Aoki](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Minero\_Aoki](https://rubytalk.org/u/Minero_Aoki)\
**Post date:** [5 December 2002 19:48 UTC](https://rubytalk.org/t/install-rb/3329/9 "2002-12-05T19:48:19Z")

</div>

Hi,

In mail “Re: install.rb”

> > ruby install.rb config  
> > ruby install.rb setup  
> > ruby install.rb install
> 
> I’ll have to join Daniel Carrera in complaining. What is really the  
> point of this multi-step procedure?

Because it is a common, flexible procedure.

> - Of all the packages using it, how many even _need_ configuration?

There are so many people who want to install packages in their  
home directory (e.g. /home/aamine/lib).

$ ruby install.rb config --prefix=$HOME

is useful for this purpose.

> - Why the middle step with setup, can’t this be done in either config or  
> install?

Hmmm… I consider some short cut.

> - The required order of these steps is not obvious to the user.

Agreed. I have added some messages.

# example

~/tmp/tmail-0.10.6 % ruby install.rb  
No task or global option given.  
Typical installation procedure is:  
$ ruby install.rb config  
$ ruby install.rb setup  
# ruby install.rb install (may require root privilege)  
Try ‘ruby install.rb --help’ for detailed usage.

> - When they break I’ve found it hard to find out why.

There are three reasons:

1. install.rb is too complicated.
2. Building procedure is generally complicated.
3. extconf.rb is a command, we cannot use it as a library.  
(But install.rb requires such functionality.)

I can resolve problem #1 (maybe).  
No one can resolve problem #2.  
We should resolve #3, but it is very hard.  
It requires replacing all existing extconf.rb.

– Minero Aoki

> **···**
>
> Anders Bengtsson [ndrsbngtssn@yahoo.se](mailto:ndrsbngtssn@yahoo.se) wrote:

---

<div class="post-metadata">

**Author:** ![Anders\_Bengtsson](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@Anders\_Bengtsson](https://rubytalk.org/u/Anders_Bengtsson)\
**Post date:** [5 December 2002 20:15 UTC](https://rubytalk.org/t/install-rb/3329/10 "2002-12-05T20:15:01Z")

</div>

Minero Aoki wrote:

> > - Of all the packages using it, how many even _need_ configuration?
> 
> There are so many people who want to install packages in their  
> home directory (e.g. /home/aamine/lib).
> 
> $ ruby install.rb config --prefix=$HOME
> 
> is useful for this purpose.

How do you then configure Ruby to find the packages there? Could that  
configuration be used by the install script in some way?

> > - The required order of these steps is not obvious to the user.
> 
> Agreed. I have added some messages.

Great, this will save lots of time for new (and old) Ruby users.

/Anders

> **···**
>
> –
> 
> A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se  
> Stockholm, Sweden |
> 
> * * *
> 
> Följ VM på nära håll på Yahoo!s officielle VM-sajt www.yahoo.se/vm2002  
> Håll dig ajour med nyheter och resultat, med vinnare och förlorare…

---

<div class="post-metadata">

**Author:** ![Minero\_Aoki](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Minero\_Aoki](https://rubytalk.org/u/Minero_Aoki)\
**Post date:** [6 December 2002 20:01 UTC](https://rubytalk.org/t/install-rb/3329/11 "2002-12-06T20:01:55Z")

</div>

Hi,

In mail “Re: install.rb”

> > There are so many people who want to install packages in their  
> > home directory (e.g. /home/aamine/lib).
> > 
> > $ ruby install.rb config --prefix=$HOME
> > 
> > is useful for this purpose.
> 
> How do you then configure Ruby to find the packages there? Could that  
> configuration be used by the install script in some way?

You can use environment variable $RUBYLIB for such purpose.

sh  
$ export RUBYLIB=$HOME/lib/ruby

csh  
$ setenv RUBYLIB=$HOME/lib/ruby

Win9x

> set RUBYLIB=C:\aamine\lib\ruby

WinNT  
(Procedure too long; aborted 🙂

– Minero Aoki

> **···**
>
> Anders Bengtsson [ndrsbngtssn@yahoo.se](mailto:ndrsbngtssn@yahoo.se) wrote:
