From: Jia Hu Date: 2012-11-20T10:33:17+09:00 Subject: Re: adding load_path --f46d0401240b9ff5a704cee33792 Content-Type: text/plain; charset=ISO-8859-1 Thank all of you. I add load path: $LOAD_PATH.insert(0, "/my/path1") $LOAD_PATH.insert(0, "/my/path2") Besides this, I also need to add: setenv $LD_LIBRARY_PATH ~/OT/usr/local/lib/site_ruby/1.8/x86_64-linux/: ~/OT/usr/local/lib/ Then it works. The shared library .so call other .so files. So I have to use $LD_LIBRARY_PATH Thanks, On Mon, Nov 19, 2012 at 8:25 PM, Grant Schoep wrote: > >> Best way to do this is add them at execute time with $LOAD_PATH > > > > You can also include the libraries in the RUBYLIB shell variable. The > > content of RUBYLIB is prepended to the default list of paths: > > > > $ export RUBYLIB=/a/b:/c/d/e:/f/g/h/i > > $ irb > > irb(main):001:0> $LOAD_PATH > > The original request mentioned they were using tcsh. For tcsh do > if you don't have RUBYLIB env variable set > > setenv RUBYLIB /some/install/path/lib > > if you already have RUBYLIB set > > setenv RUBYLIB /some/install/path/lib:#{RUBYLIB} > > Ruby will grab what is in your RUBYLIB variable, and prepend them. > > I'm sure since the author wasn't able to install libraries to the > machine, they would also no be able to edit the /etc/profile(only used > by bash by the way) > > -- > Posted via http://www.ruby-forum.com/. > > --f46d0401240b9ff5a704cee33792 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank all of you. I add load path:
$LOAD_PATH.insert(0, "/my/path1")
$LOAD_PATH.insert(0, "/my/path2= ")

Besides this, I also need to add:=A0
setenv $= LD_LIBRARY_PATH=A0 ~/OT/usr/local/lib/site_ruby/= 1.8/x86_64-linux/: ~/OT/usr/local/lib/

<= /div>
Then it works.= The shared library .so call other .so files. So I have to use $LD_LIBRARY_= PATH

Thanks,=A0

On Mon, No= v 19, 2012 at 8:25 PM, Grant Schoep <lists@ruby-forum.com> wrote:
>> Best way to do th= is is add them at execute time with $LOAD_PATH
>
> You can also include the libraries in the RUBYLIB shell variable. The<= br> > content of RUBYLIB is prepended to the default list of paths:
>
> $ export RUBYLIB=3D/a/b:/c/d/e:/f/g/h/i
> $ irb
> irb(main):001:0> $LOAD_PATH

The original request mentioned they were using tcsh. For tcsh do
if you don't have RUBYLIB env variable set

setenv RUBYLIB /some/install/path/lib

if you already have RUBYLIB set

setenv RUBYLIB /some/install/path/lib:#{RUBYLIB}

Ruby will grab what is in your RUBYLIB variable, and prepend them.

I'm sure since the author wasn't able to install libraries to the machine, they would also no be able to edit the /etc/profile(only used
by bash by the way)

--f46d0401240b9ff5a704cee33792--