[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

help with LOAD_PATH

EdUarDo

10/10/2006 1:57:00 PM

Hi, I'm in troubles with this variable. I'm running a Linux OS, after logging in, if I type:

echo $LOAD_PATH
..:/home/eyp/Desarrollo/ruby/lib:/home/eyp/Desarrollo/ruby/lib/sybase:/usr/lib/ruby

then I go into irb:

irb
irb(main):001:0> $LOAD_PATH
=> ["/usr/lib/ruby/site_ruby/1.8", "/usr/lib/ruby/site_ruby/1.8/i386-linux", "/usr/lib/ruby/site_ruby",
"/usr/lib/site_ruby/1.8", "/usr/lib/site_ruby/1.8/i386-linux", "/usr/lib/site_ruby", "/usr/lib/ruby/1.8",
"/usr/lib/ruby/1.8/i386-linux", "."]
irb(main):002:0>

which LOAD_PATH variable is showed in irb?
2 Answers

Tim Hunter

10/10/2006 2:14:00 PM

0

Eduardo Yáñez Parareda wrote:
> Hi, I'm in troubles with this variable. I'm running a Linux OS, after
> logging in, if I type:
>
> echo $LOAD_PATH
> .:/home/eyp/Desarrollo/ruby/lib:/home/eyp/Desarrollo/ruby/lib/sybase:/usr/lib/ruby
>
>
> then I go into irb:
>
> irb
> irb(main):001:0> $LOAD_PATH
> => ["/usr/lib/ruby/site_ruby/1.8",
> "/usr/lib/ruby/site_ruby/1.8/i386-linux", "/usr/lib/ruby/site_ruby",
> "/usr/lib/site_ruby/1.8", "/usr/lib/site_ruby/1.8/i386-linux",
> "/usr/lib/site_ruby", "/usr/lib/ruby/1.8",
> "/usr/lib/ruby/1.8/i386-linux", "."]
> irb(main):002:0>
>
> which LOAD_PATH variable is showed in irb?

Ruby's LOAD_PATH is a combination of a set of default directories
determined when Ruby is configured/installed, the directories (if any)
defined by the $RUBYLIB environment variable, and any directories
specified by -I options on the Ruby command line. It has nothing to do
with any $LOAD_PATH environment variable.

EdUarDo

10/10/2006 2:41:00 PM

0

Solved. I had to export RUBYLIB to modify LOAD_PATH.