On Aug 31, 10:10 am, TDR <tdruttenb... / gmail.com> wrote:
> On Aug 10, 10:22 am, TDR <tdruttenb... / gmail.com> wrote:
>
> > Ruby 1.8.6 on solaris 9.
>
> > I am a newbie.
> > I need to setLD_LIBRARY_PATHwithin my script as follows:
>
> > ENV['LD_LIBRARY_PATH'] = '/usr/local/mysql/lib/mysql:/usr/local/
> > easysoft/unixODBC/lib:/usr
> > /local/easysoft/lib'
>
> > but it doesn't seem to be "taking".  I get the error I would expect to
> > get whenLD_LIBRARY_PATHis not set:
>
> I had originally assumed this to be a problem with setting any
> environment variables.  It turns out LD_LIBRARY_PATH is a special
> case.  The syntax for setting environment variables in ruby worked
> fine for TNS_ADMIN.
>
> Moreover, I came across a posting somewhere today that explains why
> not to use LD_LIBRARY_PATH, but rather LD_RUN_PATH. So the situation
> in this posting, it turns out, is specific to LD_LIBRARY_PATH.

You can usually avoid setting either one (on Solaris, at least) if the
underlying libraries have been built with the runtime library path set
properly. In some case this means running the configure script, then
hand editing the Makefile and adding "-R /path/to/lib".

Regards,

Dan