[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

how modify $: permanently?

Greg Willits

10/27/2007 9:12:00 PM

Is there a way to add a path to $: permanently so I don't have to append
a path at the start of every script that needs it?
--
Posted via http://www.ruby-....

2 Answers

Joel VanderWerf

10/27/2007 9:29:00 PM

0

Greg Willits wrote:
> Is there a way to add a path to $: permanently so I don't have to append
> a path at the start of every script that needs it?

Use the RUBYLIB environment variable. From man ruby:

RUBYLIB A colon-separated list of directories that are added to
Ruby?s library load path ($:). Directories from this
environment variable are searched before the standard
load path is searched.

e.g.:
RUBYLIB="$HOME/lib/ruby:$HOME/lib/rubyext"


--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Greg Willits

10/27/2007 10:37:00 PM

0

Joel VanderWerf wrote:
> Greg Willits wrote:
>> Is there a way to add a path to $: permanently so I don't have to append
>> a path at the start of every script that needs it?
>
> Use the RUBYLIB environment variable. From man ruby:
>
> RUBYLIB A colon-separated list of directories that are added to
> Ruby?s library load path ($:). Directories from this
> environment variable are searched before the standard
> load path is searched.
>
> e.g.:
> RUBYLIB="$HOME/lib/ruby:$HOME/lib/rubyext"

took me a bit to put that all together (not a nix geek), but got it now.
Thanks.

I added this to my PROFILE

export RUBYLIB=$RUBYLIB:/usr/local/lib/ruby/..... etc for what I needed

-- gw

--
Posted via http://www.ruby-....