无法安装红宝石 - zlib错误 [英] cannot install ruby gems - zlib error

查看:119
本文介绍了无法安装红宝石 - zlib错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装一些Ruby Gems,这样我可以使用Ruby在我收到Twitter消息时通知我。但是,在执行 gem update --system 之后,我每次尝试执行 gem install gem environment 的输出)。

I'm trying to install some Ruby Gems so I can use Ruby to notify me when I get twitter messages. However, after doing a gem update --system, I now get a zlib error every time I try and do a gem install of anything. below is the console output I get when trying to install ruby gems. (along with the output from gem environment).

C:\data\ruby>gem install twitter
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error

C:\data\ruby>gem update --system
Updating RubyGems
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error

C:\data\ruby>gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.2.0
  - RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
  - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: c:/ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
  - GEM PATHS:
     - c:/ruby/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/


推荐答案

我今晚也开始接受这个。 Google搜索引发了一系列无法​​提供结果的建议。

I just started getting this tonight as well. Googling turned up a bunch of suggestions that didn't deliver results

gem update --system

以及一些来自jamis的代码粘贴,它应该替换package.rb中的函数,但它应该替换的原始代码无处可用被发现。

and some paste in code from jamis that is supposed to replace a function in package.rb but the original it is supposed to replace is nowhere to be found.

重新安装rubygems没有帮助。我现在重新安装红宝石.........并且它是固定的。虽然痛苦。

Reinstalling rubygems didn't help. I'm reinstalling ruby right now.........and it is fixed. Pain though.

这篇关于无法安装红宝石 - zlib错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆