Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.6.7
    • Component/s: Ruby 1.9.2
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Gems no longer build correctly in 1.9 mode. This appears to be a regression from 1.6.6, and only master and jruby-1_6 branches exhibit it.

      If you build a gem in 1.9 mode and try to install it, you get an error like this:

      system ~/projects/jsr166y-gem $ jruby gem install jsr166y-20120125.gem 
      ERROR:  While executing gem ... (Errno::EISDIR)
          Is a directory - Is a directory
      

      The problem appears to be related to how it builds the archive. With --debug, we get:

      system ~/projects/jsr166y-gem $ gem --debug install jsr166y-20120125.gem 
      ERROR:  While executing gem ... (Errno::EISDIR)
          Is a directory - Is a directory
      	org/jruby/RubyFile.java:466:in `initialize'
      	org/jruby/RubyIO.java:1088:in `open'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/installer.rb:585:in `extract_files'
      	org/jruby/RubyArray.java:1610:in `each'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/installer.rb:565:in `extract_files'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/installer.rb:179:in `install'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/dependency_installer.rb:297:in `install'
      	org/jruby/RubyArray.java:1610:in `each'
      	org/jruby/RubyEnumerable.java:933:in `each_with_index'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/dependency_installer.rb:270:in `install'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:121:in `execute'
      	org/jruby/RubyArray.java:1610:in `each'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:115:in `execute'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/command.rb:278:in `invoke'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/command_manager.rb:147:in `process_args'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/command_manager.rb:117:in `run'
      	/Users/headius/projects/jruby/lib/ruby/shared/rubygems/gem_runner.rb:65:in `run'
      	/Users/headius/projects/jruby/bin/gem:21:in `(root)'
      Exception `Gem::SystemExitException' at /Users/headius/projects/jruby/lib/ruby/shared/rubygems/user_interaction.rb:332 - Exiting RubyGems with exit_code 1
      

      Logging at that particular line the path it's trying to open:

      system ~/projects/jruby $ gem install ../jsr166y-gem/jsr166y-20120125.gem 
      "/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/jsr166y-20120125/lib/jsr166y.jar"
      "/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/jsr166y-20120125/\u0015y\u000E=\u0088q\u0099\u0000\u0015\u008E&%IE\u009C- )…\u0010(\u0015\r\u0010\u008D\u0088\u008B&4\u00898'\u009A1.\u000E8\bW\u009A8\u0084wD\e\u0015\u00878\u0082\u000FQ\u008Bv\\\u0017\u001DTtbQ\u001C8\u0015'\u009D8\u0089E7~\u0014Y\u009C]�/\u0019_O\u00139\u0019B\"\u009Cs3i\u0087\u007F\u008Ab\u0018MŠ`\v4\u00140z\u0016p)\u0090n\u0094- W\u009D\\ZeDk*\u0093/�"
      

      The path entries in the archive appear to be corrupt.

      Workaround: Building the gem in 1.8 mode produces good gems that are installable in either 1.8 or 1.9 mode.

        Activity

        Hide
        Johannes Hofmann added a comment -

        This issue seems to be resolved in jruby-1_6 branch a9e0ec1.

        Show
        Johannes Hofmann added a comment - This issue seems to be resolved in jruby-1_6 branch a9e0ec1.
        Hide
        Hiroshi Nakamura added a comment -

        This bug is fixed by JRUBY-6208 for 1.6.6, and now I re-fixed it.

        commit d56e1184011280fab387cdad0e75bf425e780dc3
        Author: Hiroshi Nakamura <nahi@ruby-lang.org>
        Date:   Mon Feb 20 18:02:47 2012 +0900
        
            Refix JRUBY-6208: GzipWriter#write should honor writeEncoding, not readEncoding
            
            Title says all.  The regression spec I added before wrongly used
            GzipReader#read() without size parameter.  GzipReader#read() uses the
            specified read encoding (it is Encoding.default_external if not
            specified) and it hides this bug.
        
        Show
        Hiroshi Nakamura added a comment - This bug is fixed by JRUBY-6208 for 1.6.6, and now I re-fixed it. commit d56e1184011280fab387cdad0e75bf425e780dc3 Author: Hiroshi Nakamura <nahi@ruby-lang.org> Date: Mon Feb 20 18:02:47 2012 +0900 Refix JRUBY-6208: GzipWriter#write should honor writeEncoding, not readEncoding Title says all. The regression spec I added before wrongly used GzipReader#read() without size parameter. GzipReader#read() uses the specified read encoding (it is Encoding.default_external if not specified) and it hides this bug.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Charles Oliver Nutter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: