From: ara.t.howard@... Date: 2007-02-01T02:09:57+09:00 Subject: Re: proper usr/bin/env ruby shebang On Thu, 1 Feb 2007, Rob Sanheim wrote: > I'm trying to convert some bash scripts to use /usr/bin/env ruby > instead of hardcoded shebang lines, and running into an issue. Using > this: > > #!/usr/bin/env ruby -w > > results in this error: > > /usr/bin/env: ruby -w: No such file or directory > > If I remove the -w, it runs and works fine. But of course, I want > the warnings check in there... > > This works fine from the command line: > > rsanheim@seekingalpha06a [/sa/bin]$ /usr/bin/env ruby -w > FOO = "hi" > FOO = "bye" > -:2: warning: already initialized constant FOO > > Any ideas? Forgive me if I'm missing something obvious here...This is > red hat 4, I believe... > > thanks, > Rob 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 -- we can deny everything, except that we have the possibility of being better. simply reflect on that. - the dalai lama