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