From: oinkoink+unet@... (Bret Jolly) Date: 2004-05-19T08:09:41+09:00 Subject: Re: Newbie installation problem: libraries? Paul Emmons wrote in message news:... > I have recently installed ruby-1.8.1 on my Mandrake Linux system. > > Everything seems to be working except any programs with "require", > such as irb requiring "irb". > > I hope this is just a matter of ruby not finding its libraries, which > are actually here somewhere. > > Do you know how I can correct this problem? > > Thanks. People have already noted how you can find what path is automatically used by ruby, e.g., by ruby -e 'puts $LOAD_PATH' To change this, you can set the shell environment variable RUBYLIB. For example, in my .bashrc on one of the computers I use, I have the lines: RUBYLIB="$HOME/comp_lang/ruby/nucm:$HOME/comp_lang/ruby/pnom" export RUBYLIB This allows me to require files in ~/comp_lang/ruby/nucm and ~/comp_lang/ruby/pnom without explicitly giving the directory. If I run a script in my home directory with the line: require 'nucm_utils' This loads the file ~/comp_lang/ruby/nucm/nucm_utils.rb into ruby. Regards, Bret