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