From: Eric Hodel Date: 2007-02-01T04:09:34+09:00 Subject: Re: proper usr/bin/env ruby shebang On Jan 31, 2007, at 08:45, 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... Linux's env/shebang is broken, so you can't use the shebang this way. It decides "ruby -w" is the name of the thing you want to lookup, and of course env can't find that because there isn't one.