PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > changing the environment for current process
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
changing the environment for current process

Réponse
 
LinkBack Outils de la discussion
Vieux 08/06/2008, 12h56   #1
Tammo Tjarks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
Vieux 09/06/2008, 16h04   #2
Garry Offord
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: changing the environment for current process

[Note: parts of this message were removed to make it a legal post.]

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
>
>


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h48.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08897 seconds with 10 queries