Install.rb

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
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.

perl Makefile.PL
make
make install

For an extension

   ruby extconf.rb
   make
   make install

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

   ruby install.rb config
   ruby install.rb setup
   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

   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

Guy Decoux

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.

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.

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. :slight_smile:

/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!

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

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.

In article 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. :slight_smile:

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 wrote:

“Or perhaps the truth is less interesting than the facts?”
Amy Weiss (accusing theregister.co.uk of engaging in ‘tabloid journalism’)
Senior VP, Communications
Recording Industry Association of America

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 wrote:

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…

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 :slight_smile:

– Minero Aoki

···

Anders Bengtsson ndrsbngtssn@yahoo.se wrote: