Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

ruby - ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

I am developing a Sencha touch 2 application. I have been following the "Styling the user interface of a Sencha Touch application" tutorial on theming of secha touch applications.

It requires me to install Ruby, Compass and SASS. I installed Ruby using the installer from rubyinstaller.org.

On executing the following command, I get the expected result which confirms correct installation:

C:>ruby -v

ruby 1.9.3p327 (2012-11-10) [i386-mingw32]

Current source is up to date:

C:>gem sources

** CURRENT SOURCES **

http://rubygems.org/

Next, since I am behind a proxy, I used the following command to install HAML/Compass:

C:>gem install -p [proxy:port] compass

ERROR:  While executing gem ... (Zlib::GzipFile::Error)
not in gzip format**

Can someone help me? I found solutions such as system update, gem sources update, but everything is up to date on my system.


Edit:

C:>gem install compass

works perfectly fine on my private system. When I try the same command from my workplace I need to use the proxy as mentioned above and that results in an error.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I assume the ERROR occurs since the web sense at my workplace blocks these downloads.

Solution: I downloaded the required gems: chunky_png, fssm, compass, sass, haml etc.. directly from http://rubygems.org/gems and placed these gems in my local directory.

After this I tried gem install compass. This first searches your local directory. On finding the required gems, installation takes place. Does not require connection to the ruby website.

Note: Run the command from the path where the gems are located

eg: I have placed the gems in C:Ruby193lib ubygems1.9.1gems

So I run the following command :

C:Ruby193lib ubygems1.9.1gems>gem install compass


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...