tag:help.rubygems.org,2010-01-19:/discussions/problems/1263-unable-to-install-rails-the-requested-item-could-not-be-loaded-wrong-mime-type-seen-in-proxy-logsRubyGems.org: Discussion 2012-08-14T01:34:36Ztag:help.rubygems.org,2010-01-19:Comment/178288142012-08-05T14:28:00Z2012-08-05T14:28:01ZUnable to install rails - "The requested item could not be loaded", "Wrong MIME-Type" seen in proxy logs<div><p>Hi,</p>
<p>I am returning to rails after a number of years and getting very
frustrated with initial install.</p>
<p>Windows XP - Ran latest (and previous) Ruby install (1.9.3)<br>
Ran "gem update --system"<br>
Ran "gem install rails" (tried several versions).</p>
<p>Keep getting:<br>
ERROR: While executing gem ... (Zlib::DataError)<br>
incorrect header check</p>
<p>Started Charles proxy (GUI proxy for windows) to see if anything
showed up.</p>
<p>Shows a GET going to <a href=
"http://production.cf.rubygems.org/quick/Marshal.4.8/rack-1.0.0.gemspec.rz">
http://production.cf.rubygems.org/quick/Marshal.4.8/rack-1.0.0.gems...</a>
with following response:</p>
<p>The requested item could not be loaded<br>
Wrong MIME-Type</p>
<p>The following was in the response header (if of use)<br>
Via: 1.0 c8be0f6fd7dcf98431343c15fdc064d0.cloudfront.net
(CloudFront)</p>
<p>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.</p>
<p>Thanks,</p>
<p>Tim</p></div>Tim McAuleytag:help.rubygems.org,2010-01-19:Comment/178288142012-08-06T11:56:28Z2012-08-06T11:56:28ZUnable to install rails - "The requested item could not be loaded", "Wrong MIME-Type" seen in proxy logs<div><p>Hi,</p>
<p>Ok, I've found a work around but believe the the gemspec files
on production.cf.rubygems.org should be fixed up if possible.</p>
<p>Initial fix:<br>
The file rack-1.0.0.gemspec.rz on <a href=
"http://production.cf.rubygems.org/quick/Marshal.4.8/">http://production.cf.rubygems.org/quick/Marshal.4.8/</a>
was not fetchable. If was giving the error message about the mime
type during download.</p>
<p>Work around:<br>
Download and save file from:<br>
<a href=
"http://chneukirchen.org/releases/gems/quick/Marshal.4.8/">http://chneukirchen.org/releases/gems/quick/Marshal.4.8/</a></p>
<p>Next I had to extract this file. Based on examples from the web,
I tried:<br>
ruby -e 'print
Gem.inflate(open("rack-1.0.0.gemspec.rz").read);'<br>
but this didn't work.</p>
<p>After some hunting, I found the following:<br>
<a href=
"http://aluigi.org/mytoolz/offzip.zip">http://aluigi.org/mytoolz/offzip.zip</a><br>
and extracted the file using:<br>
offzip rack-1.0.0.gemspec.rz rack-1.0.0.gemspec 0</p>
<p>The rack-1.0.0.gemspec file was placed into<br>
C:\Documents and
Settings\Tim.gem\specs\rubygems.org%80\quick\Marshal.4.8</p>
<p>Reran<br>
gem install rails --http-proxy <a href=
"http://localhost:8888">http://localhost:8888</a><br>
(still using proxy to track further errors)</p>
<p>This worked, for rack-1.0.0.gemspec file but failed on others...
needed to re-run for:<br>
rack-1.0.1.gemspec<br>
rack-1.1.0.gemspec</p>
<p>File mime-types-1.16.gemspec.rz then gave problems. Ended up
fetching file from:<br>
<a href=
"http://g5k-campaign.gforge.inria.fr/pkg/quick/Marshal.4.8/">http://g5k-campaign.gforge.inria.fr/pkg/quick/Marshal.4.8/</a></p>
<p>I hope this information helps someone in the future.</p>
<p>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:</p>
<ul>
<li>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).</li>
<li>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).</li>
<li>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.</li>
</ul>
<p>Just some thoughts to consider for the Rubygems folks.</p>
<p>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.</p>
<p>Tim</p></div>Tim McAuleytag:help.rubygems.org,2010-01-19:Comment/178288142012-08-14T01:34:27Z2012-08-14T01:34:27ZUnable to install rails - "The requested item could not be loaded", "Wrong MIME-Type" seen in proxy logs<div><p>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.
:(</p></div>Nick Quaranto