http://librarian.i2p/get/11341576559898998396/2309196205305292271
Because there are so many variables, this recipe prescribes using a single, consistent method, passing the script name through the -S command-line argument to either the ruby or jruby executables.The -S command-line option instructs Ruby and JRuby to load a script file from the PATH. JRuby includes its own copies of the Rake and RubyGems scripts in bin/rake and bin/gem, respectively, but they are verbatim copies of the original scripts.