Dne 13.12.2012 13:15, Michal Fojtik napsal(a):
On 12/13, Vít Ondruch wrote:
> Dne 13.12.2012 10:02, Michal Fojtik napsal(a):
>> On 12/13, Vít Ondruch wrote:
>>> Dne 12.12.2012 18:36, Miroslav Suchý napsal(a):
>>>> On 11/29/2012 09:43 AM, Bohuslav Kabrda wrote:
>>>>> - Two connected problems: 1) RPM generates auto provides from
>>>>> shebangs, e.g. #!/usr/bin/ruby will automatically require ruby
>>>>> package; 2) How to run programs with #!/usr/bin/ruby shebangs
>>>>> under JRuby?
>>>> We already have mechanism for that:
>>>> /usr/bin/ruby will be symlink to /etc/alternatives/ruby, which
>>>> will be symlink to /usr/bin/jruby or /usr/bin/ruby19 (previously
>>>> known as /usr/bin/ruby).
>>>> And let update-alternatives manage the defaults.
>> Maybe a stupid idea, but why we just don't prefix the 'jruby' with
>> So we can have lancher in '/usr/bin/jruby'. Similar for irb, gem...
>> (jirb, jgem, etc...)
>> Then the shebang will be '#!/usr/bin/jruby' and the MRI version can
>> cooexist with the jruby.
>> -- michal
> There is probably million of ruby scripts which has some #!ruby
> shebang. If only JRuby is on the system, they'll continue to work.
Why you assume that this 'milion' of ruby scripts with MRI shebangs
will continue to work on jRuby (if only that ruby is installed in
Shouldn't they? They are just Ruby. There might be definitely JRuby
specific scripts or MRI specific scripts, but in 99% it is just bug IMO.
> Typical user does not care if he runs something by MRI, JRuby or
> Rubinius. S/he only cares if it works.
Well 'typical' user here is someone that wants to run his things on jRuby
in **production**, but develop using MRI (there are milion reasons why),
Typical user install software using RPM, this is first premise. They
have no custom scripts, no additional gems, etc.
A typical user will never use Fedora MRI for development but will install
something like RVM or rbenv. Again, milion reasons why.
Typical user will not develop.
My point was to make it clear when I run something on my MRI ruby
(development/scripts) and when I run something on jRuby (production).
There will be available jruby and ruby-mri (have not thought about the
name yet) executables if you want to be sure.
Btw. are there some personas or something for Ruby users in Fedora?
Bob, the system administrator that wants to have Puppet running.
Dave, web developer that wants to deploy apps on Fedora/RHEL
Having something like that will maybe help in future :-)
Oh please :)
> Actually, I am speaking about typical user, but I personally don't
> care. I don't care if I run gem2rpm by MRI or JRuby, if it works.
You will probably find out in a while, that using 'scripts' on jRuby
isn't the best thing you do ;-) (like JVM boot time, etc).
That is true, but if you have at lease some ruby on your system, it is
better to execute script slowly, then not execute at all.