From: "D. Deryl Downey" Date: 2012-12-27T15:36:34+09:00 Subject: Re: using shebang with rvm? This is the difference. https://gist.github.com/4386008 -- D. Deryl Downey "The bug which you would fright me with I seek" - William Shakespeare - The Winter's Tale, Act III, Scene II - A court of Justice. On Dec 27, 2012, at 1:23 AM, Wesley Rishel wrote: > Thanks, but most shebang files I have seen include an absolute path to > the language interpreter. Rvm does not intervene when the shell is > interpreting a script containing a shebang. So, for example, if you > create this script on OS 10.8 it returns 1.8.7 no matter what version > you have selected in rvm. > > $ cat tryshbang.rb > #! /usr/bin/ruby > puts RUBY_VERSION > $ ./tryshbang.rb > 1.8.7 > $ > > I have since found the following recommendation in the Wikipedia article > on shebang: http://en.wikipedia.org/wiki/Shebang_(Unix) > > #! /usr/bin/env ruby > puts RUBY_VERSION > > It works. > > -- > Posted via http://www.ruby-forum.com/. >