错误:执行 gem 时 ... (Zlib::GzipFile::Error) 不是 gzip 格式 [英] ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format
问题描述
我正在开发 Sencha touch 2 应用程序.我一直在关注样式化 Sencha Touch 应用程序的用户界面" secha touch 应用主题化教程.
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.
它需要我安装 Ruby、Compass 和 SASS.我使用来自 rubyinstaller.org 的安装程序安装了 Ruby.
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]
当前源是最新的:
C:>gem sources
** CURRENT SOURCES **
http://rubygems.org/
接下来,由于我在代理后面,我使用以下命令安装 HAML/Compass:
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**
有人可以帮助我吗?我找到了系统更新、gem 源更新等解决方案,但我的系统上的所有内容都是最新的.
Can someone help me? I found solutions such as system update, gem sources update, but everything is up to date on my system.
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.
推荐答案
我认为发生错误是因为我工作场所的网络感知阻止了这些下载.
I assume the ERROR occurs since the web sense at my workplace blocks these downloads.
解决方案:我直接从 chunky_png、fssm、compass、sass、haml 等.org/gems" rel="noreferrer">http://rubygems.org/gems 并将这些 gem 放在我的本地目录中.
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.
之后我尝试了gem install compass
.这首先搜索您的本地目录.找到所需的 gem 后,就会进行安装.不需要连接到 ruby 网站.
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.
注意:从gem所在的路径运行命令
Note: Run the command from the path where the gems are located
例如:我已将 gem 放在 C:Ruby193lib ubygems1.9.1gems
eg: I have placed the gems in C:Ruby193lib ubygems1.9.1gems
所以我运行以下命令:
C:Ruby193lib
ubygems1.9.1gems>gem install compass
这篇关于错误:执行 gem 时 ... (Zlib::GzipFile::Error) 不是 gzip 格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!