Reputation: 3132
I am trying to execute the command "gem update --system" in my windows command prompt and it shows the error as
Updating rubygems-update
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
When I try to install any gems also with gem install gemname command it is showing the same error message.
Please help. I am executing the command in windows.
Upvotes: 2
Views: 2506
Reputation: 4614
For anybody who is reviving some old app:
I tried downloading GEM from rubygems.org and installing with gem install gemname.gem
but it still ended with same err:
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
Adding explicitly --local
helped.
gem install --local ~/Downloads/gemname-X.Y.gem
Not going to investigate more, but it was with:
RUBYGEMS VERSION: 1.3.5
RUBY VERSION: 1.8.7 (2013-12-22 patchlevel 375) [i686-darwin18.7.0]
in ASDF environment..with custom compiled openssl 1.0.2
Upvotes: 1
Reputation: 604
I get the same issue with ruby version 1.9.3-p551
downloaded with rbenv
on macOS High Sierra and looking for multiple solutions online but none of them work.
However, I notice that when I run
gem sources
The result is
*** CURRENT SOURCES ***
http://rubygems.org/
When I run with ruby version 2.1.9, the result is
*** CURRENT SOURCES ***
https://rubygems.org/
So I remove the http
source and use https
gem sources -r http://rubygems.org/
gem sources -a https://rubygems.org/
It works! So I doubt that the http
server has problem dealing with gzip
encoding. Hope this help for everyone using old ruby version like 1.9.3
.
Upvotes: 1
Reputation: 24070
Are you trying to do this at your workplace or school that might be blocking the downloads?
The solution in this question: ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format
Was to download the gems directly from http://rubygems.org/gems, then run the install commands, since it looks locally first.
Upvotes: 0