Unable to install rails - "The requested item could not be loaded", "Wrong MIME-Type" seen in proxy logs

Tim McAuley's Avatar

Tim McAuley

05 Aug, 2012 02:28 PM


I am returning to rails after a number of years and getting very frustrated with initial install.

Windows XP - Ran latest (and previous) Ruby install (1.9.3)
Ran "gem update --system"
Ran "gem install rails" (tried several versions).

Keep getting:
ERROR: While executing gem ... (Zlib::DataError)
incorrect header check

Started Charles proxy (GUI proxy for windows) to see if anything showed up.

Shows a GET going to http://production.cf.rubygems.org/quick/Marshal.4.8/rack-1.0.0.gems... with following response:

The requested item could not be loaded
Wrong MIME-Type

The following was in the response header (if of use)
Via: 1.0 c8be0f6fd7dcf98431343c15fdc064d0.cloudfront.net (CloudFront)

What do I need to do to get this working? Also... this should be fixed (without having to use a work around) because I am sure this is affecting other people trying a fresh install who will just give up after a few tries.



  1. 1 Posted by Tim McAuley on 06 Aug, 2012 11:56 AM

    Tim McAuley's Avatar


    Ok, I've found a work around but believe the the gemspec files on production.cf.rubygems.org should be fixed up if possible.

    Initial fix:
    The file rack-1.0.0.gemspec.rz on http://production.cf.rubygems.org/quick/Marshal.4.8/ was not fetchable. If was giving the error message about the mime type during download.

    Work around:
    Download and save file from:

    Next I had to extract this file. Based on examples from the web, I tried:
    ruby -e 'print Gem.inflate(open("rack-1.0.0.gemspec.rz").read);'
    but this didn't work.

    After some hunting, I found the following:
    and extracted the file using:
    offzip rack-1.0.0.gemspec.rz rack-1.0.0.gemspec 0

    The rack-1.0.0.gemspec file was placed into
    C:\Documents and Settings\Tim.gem\specs\rubygems.org%80\quick\Marshal.4.8

    gem install rails --http-proxy http://localhost:8888
    (still using proxy to track further errors)

    This worked, for rack-1.0.0.gemspec file but failed on others... needed to re-run for:

    File mime-types-1.16.gemspec.rz then gave problems. Ended up fetching file from:

    I hope this information helps someone in the future.

    I know Ruby / Rails are open projects and rely on voluntary time and effort but these types of issues are a big turn off for someone trying out new processes. Could I suggest:

    • Greater error reporting: "incorrect header check" did not reflect the original issue, which was a bad download (even if it was a 200 status)... ok, maybe it did. Even running in debug mode did not mention which file was affected, hence the need to use a proxy (thanks to Charles Proxy for that).
    • Greater resilience : Why did the whole process stop on what seem to be old versions of "rack" (1.0.0 vs 1.3.6) and "mimetype" (1.16 vs 1.19).
    • Redundancy: while production.cf.rubygems.org does seems to be hosted on a cloud based system, it didn't help my problem. Even using --source didn't work; it still attempted to fetch the gemspecs from the same location.

    Just some thoughts to consider for the Rubygems folks.

    And finally... thank you to all the volunteers out there for continuing to work on the likes of Ruby, Rails, gem etc... that keep the open source movement going. It is appreciated, even if we do gripe every now and then.


  2. Support Staff 2 Posted by Nick Quaranto on 14 Aug, 2012 01:34 AM

    Nick Quaranto's Avatar

    Cool. I just verified that rack-1.0.0.gemspec's doesn't seem to be verified...I wonder if you had a corrupted one on your box. :(

  3. Nick Quaranto closed this discussion on 14 Aug, 2012 01:34 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac