From: Tony Arcieri Date: 2010-09-09T05:31:05+09:00 Subject: Re: Portable method of launching another Ruby interpreter --001485f46efa6ee9ad048fc564c7 Content-Type: text/plain; charset=ISO-8859-1 Whoops, my bad... All that said, I think I found a better solution... write a wrapper script to accomplish what I want and ship it in the gem's bin. Then RubyGems handles selecting the appropriate Ruby interpreter. On Wed, Sep 8, 2010 at 12:58 PM, Joel VanderWerf wrote: > On 09/08/2010 10:56 AM, Tony Arcieri wrote: > >> I'm working on a project that requires a "clean", newly launched Ruby >> interpreter to perform a little magic. >> >> I'm looking for a portable way to determine the path to the Ruby >> interpreter >> being used by the current environment. At the very least I'd like for this >> to work across Ruby 1.8.7, Ruby 1.9.2, JRuby, and Rubinius. >> >> I've seen people suggest using Config::CONFIG for this, however from what >> I >> can tell this doesn't work on JRuby. >> >> Are there any portable solutions to this problem? >> >> > Doesn't it work on jruby? > > $ jruby -v -rrbconfig -e 'p File.join(*Config::CONFIG.values_at("bindir", > "ruby_install_name"))' > jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999) (Java > HotSpot(TM) 64-Bit Server VM 1.6.0_20) [amd64-java] > "/usr/local/jruby/bin/jruby" > > > -- Tony Arcieri Medioh! A Kudelski Brand --001485f46efa6ee9ad048fc564c7--