[Rubygems-developers] Adjusting Shebang in gem files

Eric Hodel drbrain at segment7.net
Fri Oct 13 14:44:23 EDT 2006

On Sep 22, 2006, at 2:16 PM, Jim Freeze wrote:

> On Sep 22, 2006, at 11:47 AM, Jim Weirich wrote:
>> Jim Freeze wrote:
>>> of gems (multi OS env). Basically, this means that the path to  
>>> ruby is
>>> not specified explicitly in the shebang, but is set to:
>>>   #!/usr/bin/env ruby
>> So, the question is, how should this be handled?  If the original  
>> code
>> passes switches, should we:
>> (1) ignore them
>> (2) fallback to the current style of shebang.
>> Prehaps it would be better to keep the current default so that  
>> switches
>> are preserved by default, and only use the env version if requested.
> My motivation for ignoring them is because some implementations of
> env do not support switches, particularly, linux. For example,
>    #!/usr/bin/env ruby -w
> on linux gives
>   $ ./test.rb
>   /usr/bin/env: ruby -w: No such file or directory
> but works fine on sun and freebsd.

But not from cron on FreeBSD since $PATH isn't set.

> If this is the default, then I think it needs to be without switches.

I like my -w, please don't remove it.

Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant


More information about the Rubygems-developers mailing list