On 02/17/11 - 11:26:48AM, Michal Fojtik wrote:
On 17/02/11 10:34 +0100, Vít Ondruch wrote:
>Hello,
>
>Is there some guideline how shebang should look? There are commonly used
>two versions:
>
>1) #!/usr/bin/env ruby
>2) #!/usr/bin/ruby
>
>I like the first version, because it allows more freedom and usage of
>'environment-modules' for example. Nevertheless also the second variant
>has its advantages, e.g. reliable tool chain is assured even if
>environment changes.
>
>Any thoughts on this?
I would prefer the first one, because in Fedora, Ruby interpreter is always
^^^^^ I think you mean second here
in *known* place (/usr/bin/ruby).
Yes, but that completely ignores upstream. That is, most of the software in
Fedora comes from upstream, and is (or may be) packaged for many different
distributions, some of which may have put ruby in another location.
To be honest, typing #!/usr/bin/ruby is hardwired into my brain, but I do think
that the #!/usr/bin/env ruby is more generic (and portable).
--
Chris Lalancette