Over a million developers have joined DZone.

Patch Rubygems On Windows For ERROR: While Executing Gem ... (Zlib::BufError) While Gem Install

·

# site_ruby\ruby1.8\rubygems.rb
  def self.gunzip(data)
    require 'stringio'
    require 'zlib'
    data = StringIO.new data

    # Zlib::GzipReader.new(data).read
    data.read(10) # skip the gzip header
    zis = Zlib::Inflate.new(-Zlib::MAX_WBITS)
    is = StringIO.new(zis.inflate(data.read))
  end
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}