$LOADPATH

C

Chinna Karuppan

Hi,
I am using irb and when ever i open IRB session I have to update my
$LOADPATH with my ruby program directory. $LOADPATH << "c:/rb" .How can
I avoid this.becauze I find some paths already set.So I was checking the
environment variables in windows.I didn't find any loadpath...
Any suggestion
THnks
Chinna
 
J

Joel VanderWerf

Chinna said:
Hi,
I am using irb and when ever i open IRB session I have to update my
$LOADPATH with my ruby program directory. $LOADPATH << "c:/rb" .How can
I avoid this.becauze I find some paths already set.So I was checking the
environment variables in windows.I didn't find any loadpath...
Any suggestion
THnks
Chinna

The env var is RUBYLIB, the global is $LOAD_PATH or $:.

This is on linux but should illustrate the relationship:

$ RUBYLIB="foo" ruby -e 'p $LOAD_PATH'
["foo", "/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", "."]
 
C

Chinna Karuppan

Works .Saved some time for me! Thank you
THnks

Joel said:
Chinna said:
Hi,
I am using irb and when ever i open IRB session I have to update my
$LOADPATH with my ruby program directory. $LOADPATH << "c:/rb" .How can
I avoid this.becauze I find some paths already set.So I was checking the
environment variables in windows.I didn't find any loadpath...
Any suggestion
THnks
Chinna

The env var is RUBYLIB, the global is $LOAD_PATH or $:.

This is on linux but should illustrate the relationship:

$ RUBYLIB="foo" ruby -e 'p $LOAD_PATH'
["foo", "/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", "."]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,285
Messages
2,571,416
Members
48,108
Latest member
AmeliaAmad

Latest Threads

Top