From: Rob Sanheim Date: 2007-02-01T02:17:57+09:00 Subject: Re: proper usr/bin/env ruby shebang On 1/31/07, ara.t.howard@noaa.gov wrote: > harp:~ > cat a.rb > #!/usr/bin/env ruby -w > p $VERBOSE > FOO = 42 and FOO = 42 > > harp:~ > ruby a.rb > true > a.rb:3: warning: already initialized constant FOO > > harp:~ > ruby -v > ruby 1.8.4 (2005-12-01) [i686-linux] > > harp:~ > uname -srm > Linux 2.4.21-47.0.1.EL i686 > > harp:~ > cat /etc/redhat-release > Red Hat Enterprise Linux WS release 3 (Taroon Update 8) > > > what happens for you? > > -a > -- Hmm, so that works -- the issue is where I run it as an executable (see the end of the log) sa [~]$ ruby a.rb true a.rb:3: warning: already initialized constant FOO sa [~]$ ruby -v ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-linux] sa [~]$ uname -srm Linux 2.6.9-42.0.3.ELsmp i686 sa [~]$ cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant Update 4) sa [~]$ chmod +x a.rb sa [~]$ ./a.rb /usr/bin/env: ruby -w: Permission denied - Rob