Re: Shebang
On Thu, Feb 17, 2011 at 8:41 PM, Ohad Levy wrote: > On Thu, 2011-02-17 at 08:54 -0500, Chris Lalancette wrote: >> 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). > +1 +1 People who use RVM (user or system-wide) could run into trouble should the 2nd one be used. I know it's not the most common case, but there's no denying RVM is becoming increasingly popular in the Ruby community. -- Gaveen Prabhasara ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Re: Shebang
On Thu, 2011-02-17 at 08:54 -0500, Chris Lalancette wrote: > 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). +1 ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Re: Shebang
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 ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Re: Shebang
Dne 17.2.2011 11:26, Michal Fojtik napsal(a): > 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 > in *known* place (/usr/bin/ruby). > > There was also some tries[1] to actually prohibit use of #!/usr/bin/env > completely > in Fedora packaging. > > Also FSH guarantee some interprets in /usr/bin, but AFAIK Ruby is not > there[2] yet. Maybe it will get there in next release. > > [1] http://lists.fedoraproject.org/pipermail/packaging/2009-July/006248.html > [2] http://www.pathname.com/fhs/pub/fhs-2.3.html > > -- Michal > May be I should send this question to fedora-devel, because it is more generic question then just for Ruby and it should be specified somewhere. And of course the reasons stated in [1] makes much sense (and it is aligned with my 'reliable tool chain' note). Vit [1] https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Re: Shebang
On 17/02/11 11:26 +0100, 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 s/first one/second one/ ;-) >in *known* place (/usr/bin/ruby). > >There was also some tries[1] to actually prohibit use of #!/usr/bin/env >completely >in Fedora packaging. > >Also FSH guarantee some interprets in /usr/bin, but AFAIK Ruby is not >there[2] yet. Maybe it will get there in next release. > >[1] http://lists.fedoraproject.org/pipermail/packaging/2009-July/006248.html >[2] http://www.pathname.com/fhs/pub/fhs-2.3.html > > -- Michal > >> >> >>Vit >>___ >>ruby-sig mailing list >>ruby-sig@lists.fedoraproject.org >>https://admin.fedoraproject.org/mailman/listinfo/ruby-sig > >-- > >Michal Fojtik, mfoj...@redhat.com >Deltacloud API: http://deltacloud.org > -- Michal Fojtik, mfoj...@redhat.com Deltacloud API: http://deltacloud.org ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Re: Shebang
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 in *known* place (/usr/bin/ruby). There was also some tries[1] to actually prohibit use of #!/usr/bin/env completely in Fedora packaging. Also FSH guarantee some interprets in /usr/bin, but AFAIK Ruby is not there[2] yet. Maybe it will get there in next release. [1] http://lists.fedoraproject.org/pipermail/packaging/2009-July/006248.html [2] http://www.pathname.com/fhs/pub/fhs-2.3.html -- Michal > > >Vit >___ >ruby-sig mailing list >ruby-sig@lists.fedoraproject.org >https://admin.fedoraproject.org/mailman/listinfo/ruby-sig -- Michal Fojtik, mfoj...@redhat.com Deltacloud API: http://deltacloud.org ___ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig