Dave Thomas wrote:
> 
> Jim Freeze <jim / freeze.org> writes:
> 
> > I have written several ruby libs (classes) and would like for other ruby
> > users at my site to have access to them. I would like to keep them
> > seperate from the ruby system libraries and I would like to not have each
> > program that uses them have to know where these extended libraries are at,
> > in other words, I don't want each program to have to append to the search
> > path or include the library with an explicit path.
> >
> > What is the ruby way to do this?
> 
> Can you set RUBYLIB in your /etc/profile?
> 

I just found this:

[ruby-talk:02133]
>>>
|As you can see the local directory "." is at the end of the load
|path. That means, that my current directory is the last one to be
|searched for libs.
|
|Is this intended?

Yes, It's intended.  Mostly because security reason.  If you want to
load your own file, I think you should express it explicitly.

But you can use RUBYOPT environment variable for your purpose.

  export RUBYOPT
  RUBYOPT='I."
  ruby -e 'p $LOAD_PATH'
  [".", "/usr/lib/ruby/site_ruby/1.5/i586-linux", "/usr/lib/ruby/site_ruby/1.5",
"/usr/lib/ruby/site_ruby", "/usr/lib/ruby/1.5/i586-linux", "/usr/lib/ruby/1.5", "."]
<<<

This also requires $SAFE to be 0


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA  23510            (757)623-9688 FAX 623-0433
PHP/MySQL - Ruby/Perl - HTML/Javascript