Changing the environment for current process

I have the following situation:
I require an additional library, not part of the current search path.
I have done that simply by:
$:.push(<path>)
and that would work fine if I would not need shared libs. I tried
to simply set
ENV['LD_LIBRARY_PATH'] = ENV['LD_LIBRAY_PATH']+':'+<so-path>
but that seems not to work, the shared library is not found.
It only works when I make an
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:<so-path>
before I start the script. Is there a way to modify the
environment for the current ruby process?
I would like to have the possibilites usually enabled by
module ( a tool where the environment can be altered with , where no ruby
support seems to exist).

Regards,
Tammo

When I have wanted to make sure that the lib subdir of the directory from
which the program executes is added to the load path, I use this:

ยทยทยท

#
# make sure we can pull in anything under the directory where the program is
# being executed
#
$LOAD_PATH << File::join(File::dirname($0), "lib")

seems to work for me.

On Sun, Jun 8, 2008 at 6:53 AM, Tammo Tjarks <tammo@tammo-tjarks.de> wrote:

I have the following situation:
I require an additional library, not part of the current search path.
I have done that simply by:
$:.push(<path>)
and that would work fine if I would not need shared libs. I tried
to simply set
ENV['LD_LIBRARY_PATH'] = ENV['LD_LIBRAY_PATH']+':'+<so-path>
but that seems not to work, the shared library is not found.
It only works when I make an
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:<so-path>
before I start the script. Is there a way to modify the
environment for the current ruby process?
I would like to have the possibilites usually enabled by
module ( a tool where the environment can be altered with , where no ruby
support seems to exist).

Regards,
Tammo