Zlib:BufError

May 14, 2007

So, I started installing Capistrano yesterday using:

gems install capistrano

Annoyingly, the net-ssh dependency failed with the hideous error message:
ERROR: While executing gem … (Zlib::BufError) buffer error

This seems to only happen on windows – and there doesn’t seem to be any documentation on how to fix this.

Thankfully, you can fix this problem by upgrading your RubyGems install using

gem update --system

I then installed Capistrano with no probs!
white out

Advertisements

8 Responses to “Zlib:BufError”

  1. Lucas Says:

    Thanks a lot for this post! I don’t think I would have figured it out all by myself. Thanks again!

  2. FreshFarhan Says:

    Hey thanks a lot for that info deud! I was having trouble installing capistrano with instantrails for quite a while and this was the exact problem!

  3. Tom Says:

    Thank you. I never would have figured that out on my own. I was about to /wrists


  4. […] Thnx to don’t repeat yourself. […]

  5. Greg Says:

    Thanks for this useful advice. Being a noob/intermediate RoR developer that error would have had me stymied for some time. However, with your help it only caused about a 2 minute delay 🙂

  6. Jan M Says:

    Ok, after two times “gem update –system” I still had the same error. It also suddenly wanted to update gems that were already up to date. So I did a reinstall of Ruby, then the two updates and then it worked.

    I tracked down the cause of the screwed up installation and it turned out to be the preview version of capistrano 2! Be warned. Before I figured this out I had done 5 clean Ruby installs…

    So, although the tutorial on their site tells you to, DON’T DO:
    gem install -s http://gems.rubyonrails.com capistrano

  7. stevemidgley Says:

    This turns out to be a very general problem with Zlib on Ruby for Windows. I’ve written up the code that allows you to work around it:

    http://www.misuse.org/science/2007/09/07/ruby-zlib-buffer-error-on-windows/

    Basically the core is from the RubyGems guys (Jamis Buck I think). I’ve just published the code if anyone needs to know how to avoid buffer errors in the Zlib Ruby library in other places on Windows.

  8. Shane Says:

    Thanks! I was hitting my head to the keyboard trying to figure out what the problem is because my gem was working just fine!

    I posted on my blog with reference to yours if you don’t mind. I figure there must be more rubyforge project developers trying to figure this out.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: