[Rubygems-developers] A couple of issues related to JRuby

Vladimir Sizikov vsizikov at gmail.com
Thu Apr 24 09:02:13 EDT 2008

Hi folks,

There were a couple of bug reports against JRuby recently, related to
rubygems on Windows, and I'd like to double-check with you on them

The issues are:
JRUBY-2431: Rubygems under JRuby doesn't install BAT executable files
on Windows

JRUBY-2432: Rubygems under JRuby detects the ruby executable name
incorrectly on Windows

The first issue due to fact that rubygems doesn't detect the Windows
platform on JRuby, since rubygems uses RUBY_PLATFORM, and in JRuby
case the value is "java".

This also leads to exceptions if --no-wrappers is used.

The fix is straightforward: in addition to RUBY_PLATFORM, to use
RbConfig's info to detect the platform.

The second issue is due to fact that RbConfig's ruby_install_name for
JRuby on Windows is jruby.bat (since we don't have the native binary,
only the bat file that starts java), and rubygems adds the "EXEEXT"
value thus producing: jruby.bat.exe

The fix is simple too: to check if the extension is already present
(and is equal to BAT or EXE), and only add the "EXEEXT" value in case
if no extension is present in ruby_install_name value).

Any concerns or comments? If that's OK, I'll send out a couple of
patches to resolve these issues.


More information about the Rubygems-developers mailing list