saw this error when one of my colleagues could not bundle install nor gem install linecache19:
ruby_core_source.rb:57 'initialize': not in gzip format
We are all using the same Gemfile to do bundle install, and it only happens to his laptop. After trying everything we found in google / stackoverflow, it still not working. Most of the suggestion were about cleaning the cache files in the rvm directories.
After digging into the source code of ruby_core_source.rb, I found out that the code did a gunzip and then tar extract on a tar file. So, that's the problem of the package storing on the ftp server: (ruby_core_source.rb:50)
uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/" + ruby_dir + ".tar.gz"
I am not sure why the .gz file on the server is not gzip-ed.
But then the workaround is obvious. Go to gem directory and modify the source. my ruby_core_source.rb is here: ~/.rvm/gems/ruby-1.9.2-p180@not_gzip_format_error/gems/ruby_core_source.gem/lib/ruby_core_source.rb
More coding details here: https://gist.github.com/1183048
Note: this is a different issue from tar_input.rb 'initialize': not in gzip format (Zlib::GzipFile::Error)