From: Rob Sanheim Date: 2007-02-01T02:50:15+09:00 Subject: Re: proper usr/bin/env ruby shebang On 1/31/07, ara.t.howard@noaa.gov wrote: > On Thu, 1 Feb 2007, Rob Sanheim wrote: > > > On 1/31/07, Nobuyoshi Nakada wrote: > >> Hi, > >> > >> At Thu, 1 Feb 2007 01:45:15 +0900, > >> Rob Sanheim wrote in [ruby-talk:237036]: > >> > 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 > >> > >> Do not rely on /usr/bin/env, it may not exist. > >> > >> #!/bin/sh > >> exec ruby -x "$0" "$@" > >> #!ruby -w > >> > > > > Ugh, so I need that at the top of all these scripts? I thought > > /usr/bin/env was the 'better' way to go? > > > > you can use > > #! /usr/bin/env ruby > $VERBOSE=true That will work - thanks.