Zlib:BufError while installing Capistrano on Windows
It’s time to dive into Capistrano and I can’t find any good get started tutorial.
Funny enough, I couldn’t even gem install capistrano. Apparently, on Windows, it’s common to be getting ERROR: While executing gem … (Zlib::BufError) buffer error.
To fix the problem I had to run gem update --system. Twice, because the first time it failed.
Thnx to don’t repeat yourself.
15 comments.
Thanks, I thought it was something wrong with ruby so I reinstalled everything. I wish I had read this first.
Thank you Alex!!! This fixed it for me.
Thanks Alex. This solved another gem installation failure for me.
Looking around the web this problem seems to be prevalant for anyone on windows running a 0.9.2 version of ruby gems (type `gem environment` to find out what’s running). After updating everything went smoothly. Cheers
Appreciate it Alex–solved my problem!
This is exactly what I needed to get Capistrano to install on Windows XP. Thank you!
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 tell you, DON’T DO:
gem install -s http://gems.rubyonrails.com capistrano
I am getting a bit different error.
I have instant rails installed and it works fine.
I’ve installed the Capistrano gem and it indicates success but as soon as I test it with cap -h. it throws up an error:
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano
ui.rb:5: undefined method `track_eof=’ for HighLine:Class (NoMethodError)
I’ve updated several times – each time it says:
Updating RubyGems…
Need to update 1 gems from http://gems.rubyforge.org
.
complete
Attempting remote update of rubygems-update
Successfully installed rubygems-update-0.9.4
Updating version of RubyGems to 0.9.4
Installing RubyGems 0.9.4
and indicates everything went fine.
I’m a bit frustrated since nobody else seems to have this error.
Seems like the error is referring to highline gem. See if you have it and maybe install/update.
http://rubyforge.org/projects/highline/
Thanks Alex. That did the job. Now on to the hard work! Up, up and away!
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.
Thanks mate for your tip!!
This works also when installing Rails from RubyGems:
gem update –system
gem update –system
gem install rails –include-dependencies
Thx again, Alex.
first of all,. check your ruby bin folder for zlib.dll
in mine case there was zlib1.dll , so instead of renaming the zlib1.dll , i copied it with different name zlib.dll
and that solved the issue.
Leave a Reply