You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by sebb <se...@gmail.com> on 2016/03/07 00:19:08 UTC
/usr/bin/ruby1.9.1 => /usr/bin/ruby
About half the ruby script files use /usr/bin/ruby and the others use
/usr/bin/ruby1.9.1
I'm not sure it makes sense to force the use of a specific ruby
version in this way.
Would it not be better to omit the version suffix, and document the
required ruby version(s) elsewhere?
Re: /usr/bin/ruby1.9.1 => /usr/bin/ruby
Posted by sebb <se...@gmail.com>.
On 7 March 2016 at 11:44, Sam Ruby <ru...@intertwingly.net> wrote:
> On Mon, Mar 7, 2016 at 6:33 AM, sebb <se...@gmail.com> wrote:
>> On 7 March 2016 at 00:24, Sam Ruby <ru...@intertwingly.net> wrote:
>>> On Sun, Mar 6, 2016 at 6:19 PM, sebb <se...@gmail.com> wrote:
>>>> About half the ruby script files use /usr/bin/ruby and the others use
>>>> /usr/bin/ruby1.9.1
>>>>
>>>> I'm not sure it makes sense to force the use of a specific ruby
>>>> version in this way.
>>>>
>>>> Would it not be better to omit the version suffix, and document the
>>>> required ruby version(s) elsewhere?
>>>
>>> Forcing the version of Ruby was more important on whimsy-vm1 which was
>>> based on Ubuntu 12.04. The default Ruby on 12.04 was Ruby 1.8.7 which
>>> was pre-utf-8 days (similar to the Python 2=>3 transition, just less
>>> dramatic).
>>>
>>> whimsy-vm2 is based on Ubuntu 14.04, with
>>>
>>> $ ls -l /usr/bin/ruby
>>> lrwxrwxrwx 1 root root 9 Feb 15 2014 /usr/bin/ruby -> ruby1.9.1
>>>
>>> So feel free to fix this.
>>
>> Done.
>>
>>> At the moment, the passenger/rake applications are running Ruby 2.3.0,
>>> which has a better garbage collection mechanism, more suited to long
>>> running applications.
>>
>> It occurs to me now that maybe
>>
>> A) #!/usr/bin/env ruby [1]
>> or
>> B) #!/usr/local/bin/ruby
>>
>> would be better, especially for MacOSX El Capitan which locks down /usr/bin.
>> AIUI this is because OSX uses ruby and needs to ensure a consistent
>> version, so even though one can in theory update /usr/bin/ruby, it's
>> not a good idea.
>> There may be other OSes to which this applies.
>>
>> Option A) requires the appropriate PATH to be set, so this can be vary
>> between different environments, making it harder to debug.
>> Option B) is simpler to follow and administrate, but less flexible
>> (though more flexible than /usr/bin/ruby!)
>
> I'm OK with A, and it works on whimsy-vm2, my Ubuntu machines, and my
> Mac machines.
>
> Whereas B doesn't work currently on any of those machines. It would
> require a symlink to be set up.
Yes.
> So... if you want to proceed with A, that's fine with me. Let's
> reserve 'B' for any case where a specific version of Ruby is called
> for, e.g., /usr/local/bin/ruby2.3.0.
In which case, if /usr/local/bin is on the path, one can also use a modified A:
#!/usr/bin/env ruby2.3.0
> - Sam Ruby
>
>> S.
>> [1] https://en.wikipedia.org/wiki/Env
>>
>>> - Sam Ruby
Re: /usr/bin/ruby1.9.1 => /usr/bin/ruby
Posted by Sam Ruby <ru...@intertwingly.net>.
On Mon, Mar 7, 2016 at 6:33 AM, sebb <se...@gmail.com> wrote:
> On 7 March 2016 at 00:24, Sam Ruby <ru...@intertwingly.net> wrote:
>> On Sun, Mar 6, 2016 at 6:19 PM, sebb <se...@gmail.com> wrote:
>>> About half the ruby script files use /usr/bin/ruby and the others use
>>> /usr/bin/ruby1.9.1
>>>
>>> I'm not sure it makes sense to force the use of a specific ruby
>>> version in this way.
>>>
>>> Would it not be better to omit the version suffix, and document the
>>> required ruby version(s) elsewhere?
>>
>> Forcing the version of Ruby was more important on whimsy-vm1 which was
>> based on Ubuntu 12.04. The default Ruby on 12.04 was Ruby 1.8.7 which
>> was pre-utf-8 days (similar to the Python 2=>3 transition, just less
>> dramatic).
>>
>> whimsy-vm2 is based on Ubuntu 14.04, with
>>
>> $ ls -l /usr/bin/ruby
>> lrwxrwxrwx 1 root root 9 Feb 15 2014 /usr/bin/ruby -> ruby1.9.1
>>
>> So feel free to fix this.
>
> Done.
>
>> At the moment, the passenger/rake applications are running Ruby 2.3.0,
>> which has a better garbage collection mechanism, more suited to long
>> running applications.
>
> It occurs to me now that maybe
>
> A) #!/usr/bin/env ruby [1]
> or
> B) #!/usr/local/bin/ruby
>
> would be better, especially for MacOSX El Capitan which locks down /usr/bin.
> AIUI this is because OSX uses ruby and needs to ensure a consistent
> version, so even though one can in theory update /usr/bin/ruby, it's
> not a good idea.
> There may be other OSes to which this applies.
>
> Option A) requires the appropriate PATH to be set, so this can be vary
> between different environments, making it harder to debug.
> Option B) is simpler to follow and administrate, but less flexible
> (though more flexible than /usr/bin/ruby!)
I'm OK with A, and it works on whimsy-vm2, my Ubuntu machines, and my
Mac machines.
Whereas B doesn't work currently on any of those machines. It would
require a symlink to be set up.
So... if you want to proceed with A, that's fine with me. Let's
reserve 'B' for any case where a specific version of Ruby is called
for, e.g., /usr/local/bin/ruby2.3.0.
- Sam Ruby
> S.
> [1] https://en.wikipedia.org/wiki/Env
>
>> - Sam Ruby
Re: /usr/bin/ruby1.9.1 => /usr/bin/ruby
Posted by sebb <se...@gmail.com>.
On 7 March 2016 at 00:24, Sam Ruby <ru...@intertwingly.net> wrote:
> On Sun, Mar 6, 2016 at 6:19 PM, sebb <se...@gmail.com> wrote:
>> About half the ruby script files use /usr/bin/ruby and the others use
>> /usr/bin/ruby1.9.1
>>
>> I'm not sure it makes sense to force the use of a specific ruby
>> version in this way.
>>
>> Would it not be better to omit the version suffix, and document the
>> required ruby version(s) elsewhere?
>
> Forcing the version of Ruby was more important on whimsy-vm1 which was
> based on Ubuntu 12.04. The default Ruby on 12.04 was Ruby 1.8.7 which
> was pre-utf-8 days (similar to the Python 2=>3 transition, just less
> dramatic).
>
> whimsy-vm2 is based on Ubuntu 14.04, with
>
> $ ls -l /usr/bin/ruby
> lrwxrwxrwx 1 root root 9 Feb 15 2014 /usr/bin/ruby -> ruby1.9.1
>
> So feel free to fix this.
Done.
> At the moment, the passenger/rake applications are running Ruby 2.3.0,
> which has a better garbage collection mechanism, more suited to long
> running applications.
It occurs to me now that maybe
A) #!/usr/bin/env ruby [1]
or
B) #!/usr/local/bin/ruby
would be better, especially for MacOSX El Capitan which locks down /usr/bin.
AIUI this is because OSX uses ruby and needs to ensure a consistent
version, so even though one can in theory update /usr/bin/ruby, it's
not a good idea.
There may be other OSes to which this applies.
Option A) requires the appropriate PATH to be set, so this can be vary
between different environments, making it harder to debug.
Option B) is simpler to follow and administrate, but less flexible
(though more flexible than /usr/bin/ruby!)
S.
[1] https://en.wikipedia.org/wiki/Env
> - Sam Ruby
Re: /usr/bin/ruby1.9.1 => /usr/bin/ruby
Posted by Sam Ruby <ru...@intertwingly.net>.
On Sun, Mar 6, 2016 at 6:19 PM, sebb <se...@gmail.com> wrote:
> About half the ruby script files use /usr/bin/ruby and the others use
> /usr/bin/ruby1.9.1
>
> I'm not sure it makes sense to force the use of a specific ruby
> version in this way.
>
> Would it not be better to omit the version suffix, and document the
> required ruby version(s) elsewhere?
Forcing the version of Ruby was more important on whimsy-vm1 which was
based on Ubuntu 12.04. The default Ruby on 12.04 was Ruby 1.8.7 which
was pre-utf-8 days (similar to the Python 2=>3 transition, just less
dramatic).
whimsy-vm2 is based on Ubuntu 14.04, with
$ ls -l /usr/bin/ruby
lrwxrwxrwx 1 root root 9 Feb 15 2014 /usr/bin/ruby -> ruby1.9.1
So feel free to fix this.
At the moment, the passenger/rake applications are running Ruby 2.3.0,
which has a better garbage collection mechanism, more suited to long
running applications.
- Sam Ruby