Linux install of 1.8.2

I've installed Ruby 1.8.2 from source under Fedora Core Linux. It
works, but when I run "ri String" I get "No such file to load --
rdoc/ri/ri_driver (LoadError). Also, when I run "irb" I get "No such
file to load -- irb (LoadError)". Is there something I have to do to
tell it that ruby-1.8.2/lib should be in the default LOAD_PATH?

When I run the following under my Windows installation I get lots of output.

ruby -e "puts $LOAD_PATH"

However, when I run that under my Linux installation I get no output
indicating that there is nothing in my default $LOAD_PATH.

···

--
R. Mark Volkmann
Partner, Object Computing, Inc.

I've installed Ruby 1.8.2 from source under Fedora Core Linux. It
works, but when I run "ri String" I get "No such file to load --
rdoc/ri/ri_driver (LoadError). Also, when I run "irb" I get "No such
file to load -- irb (LoadError)". Is there something I have to do to
tell it that ruby-1.8.2/lib should be in the default LOAD_PATH?

To install the documentation, you must make

    make install-doc

ruby -e "puts $LOAD_PATH"

   use single quote, i.e.

svg% ruby -e "puts $LOAD_PATH"

svg%

svg% ruby -e 'puts $LOAD_PATH'
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-linux
.
svg%

Guy Decoux

I've installed Ruby 1.8.2 from source under Fedora Core Linux. It

Which version of GCC does that ship with? Or are you using
something else for that matter?

works, but when I run "ri String" I get "No such file to load --

Which bits actually work, when you say "It works"? How was make
test when you did that before install?

rdoc/ri/ri_driver (LoadError). Also, when I run "irb" I get "No such
file to load -- irb (LoadError)". Is there something I have to do to
tell it that ruby-1.8.2/lib should be in the default LOAD_PATH?

When I run the following under my Windows installation I get lots of output.

ruby -e "puts $LOAD_PATH"

However, when I run that under my Linux installation I get no output
indicating that there is nothing in my default $LOAD_PATH.

What about
   ruby -e "puts $LOAD_PATH.inspect"

Which would tell you the difference between nil and an empty string,
which may have some diagnostic value.

         Hugh

···

On Mon, 26 Sep 2005, Mark Volkmann wrote:

Ahh! Now I see the problem. Thanks!

It assumes that I installed Ruby in /usr/local. I don't have
permission to do that. I installed it under my home directory. How
can I tell it to look there instead?

···

On 9/26/05, ts <decoux@moulon.inra.fr> wrote:

> I've installed Ruby 1.8.2 from source under Fedora Core Linux. It
> works, but when I run "ri String" I get "No such file to load --
> rdoc/ri/ri_driver (LoadError). Also, when I run "irb" I get "No such
> file to load -- irb (LoadError)". Is there something I have to do to
> tell it that ruby-1.8.2/lib should be in the default LOAD_PATH?

To install the documentation, you must make

    make install-doc

> ruby -e "puts $LOAD_PATH"

   use single quote, i.e.

svg% ruby -e "puts $LOAD_PATH"

svg%

svg% ruby -e 'puts $LOAD_PATH'
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-linux
.

--
R. Mark Volkmann
Partner, Object Computing, Inc.

> I've installed Ruby 1.8.2 from source under Fedora Core Linux. It

Which version of GCC does that ship with? Or are you using
something else for that matter?

I'm using GCC and it is version 3.3.1.

> works, but when I run "ri String" I get "No such file to load --

Which bits actually work, when you say "It works"?

What I meant was that "ruby -v" responds with "ruby 1.8.2 (2004-12-25)
[i686-linux]".

How was make test when you did that before install?

It says "test succeeded".

> rdoc/ri/ri_driver (LoadError). Also, when I run "irb" I get "No such
> file to load -- irb (LoadError)". Is there something I have to do to
> tell it that ruby-1.8.2/lib should be in the default LOAD_PATH?
>
> When I run the following under my Windows installation I get lots of output.
>
> ruby -e "puts $LOAD_PATH"
>
> However, when I run that under my Linux installation I get no output
> indicating that there is nothing in my default $LOAD_PATH.

What about
   ruby -e "puts $LOAD_PATH.inspect"

Which would tell you the difference between nil and an empty string,
which may have some diagnostic value.

As Guy suggested, I just needed to use single quotes around the
command instead of double. The LOAD_PATH it outputs looks fine except
that all the directories start with /usr/local/lib/ruby.

···

On 9/26/05, Hugh Sasse <hgs@dmu.ac.uk> wrote:

On Mon, 26 Sep 2005, Mark Volkmann wrote:

--
R. Mark Volkmann
Partner, Object Computing, Inc.

It assumes that I installed Ruby in /usr/local. I don't have
permission to do that. I installed it under my home directory. How
can I tell it to look there instead?

Change the PATH variable, something like (if it's in $HOME/local/bin)

  export PATH=$HOME/local/bin:$PATH

Guy Decoux

I had already done that. The problem is that changing PATH doesn't
change what's in the default LOAD_PATH. When I run "ruby -e 'puts
$LOAD_PATH' " it outputs the same thing it did for you where all the
directories start with /usr/local/lib/ruby.

···

On 9/26/05, ts <decoux@moulon.inra.fr> wrote:

> It assumes that I installed Ruby in /usr/local. I don't have
> permission to do that. I installed it under my home directory. How
> can I tell it to look there instead?

Change the PATH variable, something like (if it's in $HOME/local/bin)

  export PATH=$HOME/local/bin:$PATH

--
R. Mark Volkmann
Partner, Object Computing, Inc.

I had already done that. The problem is that changing PATH doesn't
change what's in the default LOAD_PATH. When I run "ruby -e 'puts
$LOAD_PATH' " it outputs the same thing it did for you where all the
directories start with /usr/local/lib/ruby.

Because it was not compiled with the right option, in ruby-1.8.3

   make distclean
   mkdir $HOME/local
   ./configure --prefix=$HOME/local
   make
   make install
   make install-doc

--prefix is important

Guy Decoux

Change or create a new variable called RUBYLIB that points to where
your ruby libraries are located.

On tcsh, use:
setenv RUBYHOME "$HOME/local/lib/ruby"
setenv PATH "$RUBYHOME/bin:$PATH"
setenv RUBYLIB "$RUBYHOME/lib:$RUBYHOME/lib/ruby/1.8"

Other shells use a slightly different syntax.

You will need to add all the following paths:
..../lib/ruby/site_ruby/1.8
..../lib/ruby/site_ruby/1.8/i386-msvcrt # where .so's are (varies)
..../lib/ruby/site_ruby/
..../lib/ruby/1.8
..../lib/ruby/1.8/i386-mswin32 # where .so's are (varies)

indeed. if you plan on compiling any extensions i would highly reccomend
doing

   export prefix=$HOME/local
   export LD_RUN_PATH=$HOME/local
   export LD_LIBRARY_PATH=$HOME/local

   make distclean
   mkdir $prefix
   ./configure --prefix=$prefix
   make
   make install
   make install-doc

doing the first three for every third party lib you intall will greatly ease
compiling and using extensions which themselves link to other libraries : like
the ruby postgres lib which, itself, uses the postgres client libs.

in fact, i wonder why mkmf would not set LD_RUN_PATH to $prefix or $libdir
when compiling? it would avert a lot of problems...

cheers.

-a

···

On Mon, 26 Sep 2005, ts wrote:

> I had already done that. The problem is that changing PATH doesn't
> change what's in the default LOAD_PATH. When I run "ruby -e 'puts
> $LOAD_PATH' " it outputs the same thing it did for you where all the
> directories start with /usr/local/lib/ruby.

Because it was not compiled with the right option, in ruby-1.8.3

  make distclean
  mkdir $HOME/local
  ./configure --prefix=$HOME/local
  make
  make install
  make install-doc

--prefix is important

--

email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
Your life dwells amoung the causes of death
Like a lamp standing in a strong breeze. --Nagarjuna

===============================================================================

> I had already done that. The problem is that changing PATH doesn't
> change what's in the default LOAD_PATH. When I run "ruby -e 'puts
> $LOAD_PATH' " it outputs the same thing it did for you where all the
> directories start with /usr/local/lib/ruby.

Because it was not compiled with the right option, in ruby-1.8.3

   make distclean>
   mkdir $HOME/local
   ./configure --prefix=$HOME/local

Thanks! I didn't know about the --prefix option.

···

On 9/26/05, ts <decoux@moulon.inra.fr> wrote:

   make
   make install
   make install-doc

--prefix is important

--
R. Mark Volkmann
Partner, Object Computing, Inc.