[Rubygems-developers] Questions on 1.0.0 on JRuby

Luis Lavena luislavena at gmail.com
Mon Apr 7 16:43:54 EDT 2008

On Mon, Apr 7, 2008 at 5:27 PM, Susan Potter <me at susanpotter.net> wrote:
> >  PATH is one answer.
>  >  aliasing 'jgem' to 'jruby -S gem' is another.
>  >  linking 'gem' to jruby/bin/gem' is another.
>  >  running 'jruby -S gem' is another.
>  BTW the problem under discussion isn't on Linux/BSD or other UNIX
>  systems it is on Windows, I hope you are aware that we are talking
>  about the following?
>  See:
>  http://rubyforge.org/pipermail/rubygems-developers/2008-March/003635.html
>  and
>  http://rubyforge.org/pipermail/rubygems-developers/2008-March/003636.html

I'll like to add that _this can happen under Linux/BSD too_

If jRuby 'gem' script overwrites MRI one, or in cae you installed
jruby in not a default path (and altered $PATH), then you will face
the same situation described on those emails.

>  The problem is that the JRuby gem was always running even when the MRI
>  binary path was in front of it in the PATH variable on Windows.  The
>  only solution is to create aliases the other way: to alias
>  /full/path/to/c/ruby/gem to rgem, which is the converse of your
>  solution and still ends up with people using different names for
>  different implementations locally.  So scripts, etc. need to take this
>  in consideration anyway, and promotes a non-uniform way of doing
>  things just to get things working like we would expectg.

There is a order of precedence for the batch files scripts:


If you was running with a older (pre 1.0 version of rubygems) or older
One-Click installer, the stub scripts generated by Windows were
'.cmd', and JRuby ships with '.bat' files, which got higher precedence
over .cmd files.

So, "in the wild", is quite common this situation. Under latest -
updated scenarios shouldn't happen, unless JRuby is set in front of
the PATH.

>  I am no longer on Windows, so I cannot comment, but the PATH
>  switch/aliasing is a PITA either even on Linux.  Nobody needs to tell
>  me Windows is not ideal for most open source development that isn't
>  based on .NET or related MS products/languages, but millions of
>  businesses make their developers use it.


>  In theory you are right, there shouldn't be different names for
>  different implementation versions of RubyGems when it is ultimately
>  the same underlying source, however, in practice developers caught out
>  with these issues on Windows are the ones that send tons of emails
>  requesting support to RubyGems.  Finger pointing to RubyGems rather
>  than JRuby, when in fact it appears to be a JRuby fault, not RubyGems.
>   Isn't this right Luis?

On the spot! I got several mails related to Mongrel, mongrel_service
and some gems under One-Click that failed due NetBeans installation of
jRuby or being jRuby set on the PATH "under unknown circumstances".

>  Has anyone contacted JRuby about these issues and know what the status
>  of their fix is and when it is expected to be released?  If it isn't
>  resolved or planned to be shortly is the RubyGems project willing to
>  take the hit for a JRuby issue that they do not deem important to
>  solve?

I guess Charles is the right person to ask, since he is part of JRuby team.

Taking responsibility, latest One-Click Installer (1.8.6-26) ships
with .bat files instead of original .cmd ones, and new rubygems
updates will generate the correct .bat file too.

On other projects, I cannot comment or provide more than I'm doing
right now, and even with all that, there are 2 to 5 issues about this
weekly or so.

Luis Lavena
Multimedia systems
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

More information about the Rubygems-developers mailing list