ERROR: While executing gem … (Zlib::BufError) in windows

So today I’m trying to update my gems and I get this error on random gems like rspec-rails but rspec updated fine.

I googled the issue and found great articles on the error, unfortunately none of them really worked. This brought me to posting what I did to fix it the error.

First, based on dontrepeatyourself, I updated to the latested gem system (version 1.3.3).
gem update --system
Based on what I’ve read on the site, it fixed the issue for a lot of people (keep in mind this is an article from 2007) but it didn’t fix my issue. I continued looking for another solution, and I found a bunch of Window’s specific fixes that involved altering ruby code which I wasn’t going to attempt. Some article comments said to re-install ruby but who has time for that? Other posts (in the comments) said to download windows specific GZip ports but that also had no effect. I even installed a zliby gem hoping it would replace the Zlib but that still didn’t work. So I did what every windows user should do when the problem isn’t getting fixed, REBOOT!. After the reboot, gems updated without a problem (well except of the usual SQLite3 update error on windows

Long story short

try calling
gem update --system
And then Reboot your system and see if that fixes it

Please leave me a comment to let me know if this helped you

Learn More

Removing a remote git branch

I was showing someone how great git is using the new version of MSYSgit (version 1.6.2.2.1669.g7eaf8) and found out that calling git push –all will push ALL branches, even if they don’t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily a quick google search pointed me to this great blog post: .liferc.
Reading this, very to the point, post I was a little confused on what is my repository. So I figured I’d clearify a bit by what you need to do.
Say you have a git branch that you pushed called ‘new_feature_26‘ and you needed to remove it from your remote server called origin, the command would be:

git push origin :heads/new_feature_26

I’m not exactly sure how this works by deleting the remote branch but I know it does!

Learn More