From: ara.t.howard@... Date: 2007-02-25T13:59:15+09:00 Subject: Re: Ruby subprocess On Sun, 25 Feb 2007, badcherry wrote: > I am wanting inside of a ruby script to execute another ruby script in > a subprocess in the same manner as exec(). As first thought I > considered seeing if you can lookup the ruby executable path from > within ruby, but I couldn't find a way of doing it. If that was the > case you could just say exec("/usr/bin/ruby " + "file.rb"). > > require 'rbconfig' def which_ruby c = ::Config::CONFIG File::join(c['bindir'], c['ruby_install_name']) << c['EXEEXT'] end ruby = which_ruby exec ruby, 'file.rb' probably won't work on windows since the one-click breaks (or used to break) rbconfig. -a -- be kind whenever possible... it is always possible. - the dalai lama