From: Gennady Date: 2003-05-20T08:54:20+09:00 Subject: Re: The interpreter path ----- Original Message ----- From: "Simon Strandgaard" <0bz63fz3m1qt3001@sneakemail.com> Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Monday, May 19, 2003 12:28 PM Subject: Re: The interpreter path > On Tue, 20 May 2003 02:54:49 +0900, Gennady wrote: > > > Unfortunatelly, this will give me an interpreter found in the current PATH, > > it will not be the right one if the interpreter has been invoked with an > > absolute path that is not in PATH variable. I rather need the interpreter > > path invoked to handle THIS particular code. > > How about: > > > ruby dir.rb > /home/neoneye/stow/ruby18_r2 > > cat dir.rb > require 'mkmf' > puts Config::CONFIG["exec_prefix"] As far as I understand it holds values the interpreter has been compiled with. They will be the same no matter where you place the ruby executable afterwards. And I am interested in an invocation path. I am using Ruby for our product installation. I place the interpreter and a part of Ruby system library into the package together with other product files. During installation I need to invoke a ruby script (via a boot-strap shell script) right form a CD or whatever location a package is extracted into (a target host is not required to have Ruby installed). The first thing I have to do in my Ruby script is to adjust LOAD_PATH relative to the interpreter invocation path. So I hoped that some constant is available for this. I found nothing of the kind so far. Actually, I figured out another way to do the job. However I still think it would be nice to have this feature in Ruby. Thanks to all responders, Gennady.