Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.1.2
-
Component/s: None
-
Labels:None
-
Environment:JRuby 1.1.1
-
Number of attachments :
Description
This is a placeholder bug for rubygems issue with JRuby - inablity to detect the Windows platform.
Rubygems uses RUBY_PLATFORM to detect the platform, and this approach doesn't work with JRuby, since RUBY_PLATFORM is always 'java'.
See lib/ruby/site_ruby/1.8/rubygems.rb, self.win_platform? in there.
Another issue caused by this: an attempt to use --no-wrappers on Windows blows up:
D:\work>jruby -S gem install rake --no-wrappers
D:/work/jruby-dev/jruby/lib/ruby/1.8/fileutils.rb:1411:in `ln_s': symlink() function is unimplemented on this
machine (NotImplementedError)
from D:/work/jruby-dev/jruby/lib/ruby/1.8/fileutils.rb:1411:in `fu_each_src_dest0'
from D:/work/jruby-dev/jruby/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:300:in `generate_bin_symlink
'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:244:in `generate_bin'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:235:in `each'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:235:in `generate_bin'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:136:in `install'
from D:/work/jruby-dev/jruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:204:in `install'
... 10 levels...
from D:/work/jruby-dev/jruby/bin/gem:14:in `load'
from file:/D:/work/jruby-dev/jruby/lib/jruby.jar!/jruby/commands.rb:14:in `gem'
from D:/work/jruby-dev/jruby/bin/gem:1
I made a tweak to the win_platform? method to also check Config::CONFIG["host_os"] which should cause it to install bat files correctly on Windows now. I will follow up with RubyGems-dev to get the same change incorporated into RubyGems proper.