Rails 3.0.5 breaking

Marc's Avatar

Marc

19 Mar, 2011 02:31 AM

$ gem install rails breaks with a Zlib::DataError on actionpack, however
$ gem install rails -v 3.0.4 Works fine...?

  1. Support Staff 1 Posted by Luis Lavena on 19 Mar, 2011 02:38 AM

    Luis Lavena's Avatar

    Please ensure you're using latest version of RubyGems, then try the same
    command adding --debug --verbose options and include the full output of that
    and gem env command.

  2. 2 Posted by Marc on 19 Mar, 2011 06:06 AM

    Marc's Avatar

    Rubygems version:
    1.6.2 Output from the command

    Exception NameError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:163 - uninitialized constant Gem::Commands::InstallCommand ExceptionLoadError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
    Exception LoadError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:61 - no such file to load -- psych ExceptionGem::LoadError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:900 - Could not find RubyGem sources (> 0.0.1)

    GET http://rubygems.org/latest_specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/latest_specs.4.8.gz
    304 Not Modified
    GET http://rubygems.org/specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/specs.4.8.gz
    304 Not Modified
    Installing gem actionpack-3.0.5
    Exception Zlib::DataError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:219 - invalid stored block lengths ExceptionZlib::DataError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:222 - invalid stored block lengths
    Exception `IOError' at /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:24 - closed stream
    ERROR: While executing gem ... (Zlib::DataError)

    invalid stored block lengths
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:222:in `finish'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:222:in `zipped_stream'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:129:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:127:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/format.rb:66:in `from_io'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:22:in `open'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/package.rb:68:in `open'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `from_io'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/format.rb:46:in `from_file_by_path'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/format.rb:45:in `open'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/format.rb:45:in `from_file_by_path'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/installer.rb:413:in `load_gem_file'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/installer.rb:103:in `initialize'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:286:in `new'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:286:in `install'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:270:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:270:in `install'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `execute'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `each'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `process_args'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `run'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in `run'
    /home/sapient/.rvm/rubies/ruby-1.8.7-p334/bin/gem:25
    
  3. Support Staff 3 Posted by Luis Lavena on 19 Mar, 2011 12:07 PM

    Luis Lavena's Avatar

    This could be due a corrupt downloaded file.

    Please try removing the cache directory (which you can see in "gem
    env" as I mentioned before under GEM PATHS)

    rm -rf path/to/cache

    The cache is inside the GEM PATH showed by "gem env"

    And try gem installation again.

  4. 4 Posted by Marc on 19 Mar, 2011 12:19 PM

    Marc's Avatar

    Thanks for the reply Luis

    I don't think it is a corrupt download as I am using rvm and the first thing I tried was switching ruby interpreters and gemsets, getting the same result for all.

    I did rm the directory anyway, with the same result.

    Thanks!

  5. Support Staff 5 Posted by Luis Lavena on 19 Mar, 2011 12:38 PM

    Luis Lavena's Avatar

    RVM symlinks cache directory along ruby interpreters

    Are you sure you removed the cache directory properly? What version of
    zlib is installed in your system?

  6. 6 Posted by Marc on 19 Mar, 2011 01:27 PM

    Marc's Avatar

    I have the latest zlib 1.2.3.4 (Ubuntu version I suppose).

    I went so far as to completely remove rvm from my system and reinstall. I then installed ruby the normal way, and once linking against a downloaded zlib 1.2.5 (as per http://rvm.beginrescueend.com/packages/zlib/ ). None of this works.

    I was convinced this was a zlib error for hours, but everything else is working perfectly, including installing rails 3.0.4 . The only gem which refuses to install seems to be actionpack 3.0.5

    Thanks

  7. 7 Posted by Marc on 19 Mar, 2011 02:19 PM

    Marc's Avatar

    I have now tried manually downloading actionpack-3.0.5.gem from rubygems.org, and extracting it with fileroller.

    When opened, metadata.tar.gz opens fine, but trying to open data.tar.gz gives an unrecoverable error.
    gzip: stdin: invalid compressed data--format violated

  8. Support Staff 8 Posted by Luis Lavena on 19 Mar, 2011 02:28 PM

    Luis Lavena's Avatar

    I was able to manually download actionpack-3.0.5.gem, extract it and
    no failures.

    The file I downloaded weight 344 KB (352.256 bytes), perhaps your
    download is corrupt?

    The MD5 of my file is af25980a393ab111f9fcef3d65f73c89

  9. 9 Posted by Marc on 19 Mar, 2011 03:16 PM

    Marc's Avatar

    Well, I have no idea how, but actionpack downloads incorrectly on my local computer - and I get the wrong md5 on my local machine. However when I tried from my linode, the file downloaded fine, and the md5 is the same as yours.

    I suppose there could be some weird caching done by my ISP or something, but this is infuriating.

    Thanks so much for your patience and time Luis, you are awesome!

  10. Support Staff 10 Posted by Luis Lavena on 19 Mar, 2011 03:39 PM

    Luis Lavena's Avatar

    Can you try the following?

    Try wget from http://production.s3.rubygems.org/gems/actionpack-3.0.5.gem

    That will skip Amazon CloudFront CDN which is being used in production and download directly from S3.

    If that works, it could be incorrect fetch from CloudFront to your closest point of delivery.

    Hope that helps.

  11. 11 Posted by Marc on 19 Mar, 2011 04:55 PM

    Marc's Avatar

    Going straight to the s3 server fetched the correct gem.

    I then changed to a different ruby, blatted all cached gems, and tried again, and, as if by magic, it worked fine... I reckon there was a broken gem cached somewhere, I just have no idea where.

    Thanks again for being awesome Luis

  12. Support Staff 12 Posted by Luis Lavena on 19 Mar, 2011 05:03 PM

    Luis Lavena's Avatar

    You're welcome, closing this out.

  13. Luis Lavena closed this discussion on 19 Mar, 2011 05:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM
06 Oct, 2014 02:30 PM