On 14 September 2011 20:08, Florian Gilcher <flo / andersground.net> wrote:
>
> On Sep 14, 2011, at 7:43 PM, Roger Pack wrote:
>
>>> get current interpreter path
>>
>> Gem.ruby # if you have rubygems loaded
>> or
>>
>> OS.ruby_bin
>> => "C:/installs/Ruby187/bin/ruby.exe"
>>
>> with the OS gem.
>> -r
>
> To add to that: rake adds the constant RUBY, which also holds the path of the interpreter running the Rakefile.

And neither works:

cp `which ruby` ~/bin/testruby
testruby -rubygems  -e "require 'rake' ; p RUBY"
"/usr/bin/ruby1.8"
testruby -rubygems  -e "require 'os' ; p OS.ruby_bin"
"/usr/bin/ruby1.8"

Thanks

Michal