Rails 3.0.5 breaking
$ gem install rails breaks with a Zlib::DataError on actionpack,
however
$ gem install rails -v 3.0.4 Works fine...?
Comments are currently closed for this discussion. You can start a new one.
$ gem install rails breaks with a Zlib::DataError on actionpack,
however
$ gem install rails -v 3.0.4 Works fine...?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Luis Lavena on 19 Mar, 2011 02:38 AM
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.
3 Posted by Marc on 19 Mar, 2011 06:06 AM
Rubygems version:
1.6.2Output from the commandException
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 -- psychException
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 lengthsException `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)
Support Staff 4 Posted by Luis Lavena on 19 Mar, 2011 12:07 PM
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.
5 Posted by Marc on 19 Mar, 2011 12:19 PM
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!
Support Staff 6 Posted by Luis Lavena on 19 Mar, 2011 12:38 PM
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?
7 Posted by Marc on 19 Mar, 2011 01:27 PM
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
8 Posted by Marc on 19 Mar, 2011 02:19 PM
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 violatedSupport Staff 9 Posted by Luis Lavena on 19 Mar, 2011 02:28 PM
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
10 Posted by Marc on 19 Mar, 2011 03:16 PM
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!
Support Staff 11 Posted by Luis Lavena on 19 Mar, 2011 03:39 PM
Can you try the following?
Try wget from
http://production.s3.rubygems.org/gems/actionpack-3.0.5.gemThat 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.
12 Posted by Marc on 19 Mar, 2011 04:55 PM
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
Support Staff 13 Posted by Luis Lavena on 19 Mar, 2011 05:03 PM
You're welcome, closing this out.
Luis Lavena closed this discussion on 19 Mar, 2011 05:03 PM.