JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-2431

Rubygems under JRuby doesn't install BAT executable files on Windows

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major 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 :
      0

      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
      

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        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.

        Show
        Charles Oliver Nutter added a comment - 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.
        Hide
        Charles Oliver Nutter added a comment -

        The RubyGems issue has been reported here, with a patch:

        http://rubyforge.org/tracker/index.php?func=detail&aid=20379&group_id=126&atid=575

        Show
        Charles Oliver Nutter added a comment - The RubyGems issue has been reported here, with a patch: http://rubyforge.org/tracker/index.php?func=detail&aid=20379&group_id=126&atid=575

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Vladimir Sizikov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: