# Buffer error while executing gem

**URL:** <https://www.ruby-forum.com/t/buffer-error-while-executing-gem/104132>\
**Category:** Ruby\
**Created:** [May 14, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/buffer-error-while-executing-gem/104132 "2007-05-14T17:15:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronaldfischer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/67e7ee/32.png) [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Post date:** [May 14, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/buffer-error-while-executing-gem/104132/1 "2007-05-14T17:15:37Z")

</div>

Hello,

when running on Windows XP gem.exe which comes with Ruby 1.8.5, I get  
the following error:

H:\>C:\ruby185\bin\gem install net-ssh  
Bulk updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
Install required dependency needle? [Yn]  
ERROR: While executing gem … (Zlib::BufError)  
buffer error

What could be the reason? Here is my gem environment:

H:\>C:\ruby185\bin\gem environment  
RubyGems Environment:

- VERSION: 0.9.2 (0.9.2)
- INSTALLATION DIRECTORY: C:/ruby185/lib/ruby/gems/1.8
- GEM PATH:
  - C:/ruby185/lib/ruby/gems/1.8

- REMOTE SOURCES:
  - [http://gems.rubyforge.org](http://gems.rubyforge.org)

Ronald

---

<div class="post-metadata">

**Author:** ![ronaldfischer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/67e7ee/32.png) [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Post date:** [May 14, 2007, 5:24pm UTC](https://www.ruby-forum.com/t/buffer-error-while-executing-gem/104132/2 "2007-05-14T17:24:38Z")

</div>

On 5/14/07, Ronald F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

See previous thread named: ANN: RubyGems 0.9.3 Released

---

<div class="post-metadata">

**Author:** ![ronaldfischer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/67e7ee/32.png) [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Post date:** [May 14, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/buffer-error-while-executing-gem/104132/3 "2007-05-14T18:02:21Z")

</div>

I tried to update gem from 0.9.2 to 0.9.3. My state of the system  
_before_  
the update was this:

H:\>C:\ruby185\bin\gem environment  
RubyGems Environment:

- VERSION: 0.9.2 (0.9.2)
- INSTALLATION DIRECTORY: C:/ruby185/lib/ruby/gems/1.8
- GEM PATH:
  - C:/ruby185/lib/ruby/gems/1.8

- REMOTE SOURCES:
  - [http://gems.rubyforge.org](http://gems.rubyforge.org)

Here is how I performed the update; please note the error message:

H:\>gem update --system  
Updating RubyGems…  
Need to update 6 gems from [http://gems.rubyforge.org](http://gems.rubyforge.org)  
…  
complete  
Attempting remote update of rubygems-update  
Successfully installed rubygems-update-0.9.3  
Updating version of RubyGems to 0.9.3  
Installing RubyGems 0.9.3  
Error opening script file: setup.rb (Das System kann die angegebene  
Datei nicht  
finden)  
RubyGems system software updated

After the update, there was no file ‘gem.bat’ in my ruby/bin directory -  
only a shell script file named “gem”. Next, I tried to do a manual  
install:  
I downloaded the zip file for gem 0.9.3, unpacked, and executed in this  
directory:

ruby setup.rb all

which resulted in:

…  
install sha1.rb c:/ruby185/lib/ruby/site\_ruby/1.8/rubygems/digest  
install sha2.rb c:/ruby185/lib/ruby/site\_ruby/1.8/rubygems/digest  
\<— lib/rubygems/digest  
\<— lib/rubygems  
\<— lib  
hook H:/dl/lang/rubygems-0.9.3/./post-install.rb failed:  
undefined method `file\_name’ for #Gem::Specification:0x2e47648  
Try ‘ruby setup.rb --help’ for detailed usage.

Now, despite the error, I _do_ have a gem.bat in my bin directory,  
and at first sight it seems to work as expected; but I still wonder  
whether this error could cause problems in the future.

Ronald
