tag:help.rubygems.org,2010-01-19:/discussions/problems/132-more-errors-when-mirroring-rubygemsRubyGems.org: Discussion 2011-04-07T20:59:27Ztag:help.rubygems.org,2010-01-19:Comment/14732722010-04-16T13:31:20Z2010-04-17T22:47:29ZMore errors when mirroring rubygems<div><p>In addition to the '403 Forbidden' errors I was seeing on
certain gems, yesterday I started getting endless '400 Bad Request'
errors.</p>
<p>The problem appears to occur with non-Ruby platform gems. It
seems that the gem specification provided by the server incorrectly
indicates that these gems are of the Ruby platform. Here is an
example that I dumped out with inspect:</p>
<pre>
<code>#<Gem::Specification:0x107679a00 @extra_rdoc_files=[], @bindir="bin", @signing_key=nil,
@default_executable=nil, @rubyforge_project=nil, @licenses=[], @summary="HSQLDB JDBC
adapter for JRuby on Rails.", @loaded=false, @rdoc_options=[], @description="Install this gem
to use HSQLDB with JRuby on Rails.", @dependencies=[<Gem::Dependency type=:runtime name=
"activerecord-jdbc-adapter" requirements="= 0.9.4">, <Gem::Dependency type=:runtime name=
"jdbc-hsqldb" requirements=">= 1.8.0.7">], @executables=[], @autorequire=nil, @name=
"activerecord-jdbchsqldb-adapter", @loaded_from=nil, @date=Mon Apr 05 00:00:00 -0400 2010,
@version=#<Gem::Version "0.9.4">, @new_platform="ruby", @license=[], @files=[], @authors=
["Nick Sieger", "Ola Bini and JRuby contributors"], @post_install_message=nil, @test_files=[], @required_rubygems_version=#<Gem::Requirement:0x10767b1e8 @requirements=[[">=",
#<Gem::Version "0">]]>, @require_paths=["lib"], @has_rdoc=true, @specification_version=3,
@original_platform=nil, @extensions=[], @cert_chain=[], @platform="ruby", @email=nil,
@requirements=[], @required_ruby_version=#<Gem::Requirement:0x10767b4e0 @requirements=
[[">=", #<Gem::Version "0">]]>, @rubygems_version="1.3.5", @homepage=nil>`</code>
</pre>
<p>This specification causes gem mirror to attempt fetching
<code>http://rubygems.org/gems/activerecord-jdbchsqldb-adapter-0.9.4.gem</code>,
which does not exist. The proper URL would be
<code>http://rubygems.org/downloads/activerecord-jdbchsqldb-adapter-0.9.4-java.gem</code>
with the Java platform properly indicated.</p>
<p>Thanks,</p>
<p>-- Brian Wells</p></div>brianwellstag:help.rubygems.org,2010-01-19:Comment/14732722010-04-23T05:03:30Z2010-04-23T05:03:30ZMore errors when mirroring rubygems<div><p>Hi there,</p>
<p>It's on my list to run through all the gems and make it's
working, we've gotten several reports of <code>gem mirror</code>
not working as expected. Can you just visit that page and download
it if you need it?</p>
<p><a href=
"http://rubygems.org/gems/activerecord-jdbchsqldb-adapter">http://rubygems.org/gems/activerecord-jdbchsqldb-adapter</a></p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/14732722010-07-03T16:51:40Z2010-07-03T16:55:14ZMore errors when mirroring rubygems<div><p>Same here, lots of 400s and a few 403s on a gem mirror.</p>
<p>Using ruby-1.8.7 and gem 1.3.7</p></div>Lamonttag:help.rubygems.org,2010-01-19:Comment/14732722010-07-07T10:32:04Z2010-07-07T10:32:04ZMore errors when mirroring rubygems<div><p>There are some bugs in <code>gem mirror</code> that I have
fixed, although Eric has asked that we remove the mirror command in
favour of maintaining a separate mirror gem. I will clean up the
code I have used and produce this soon. There is still a shortlist
of gems that fail, however, it is not the set that <code>gem
mirror</code> in its present state generates. In it's present state
<code>gem mirror</code> uses <code>spec.gem_file</code>, when it
should be using the <code>full_name</code> field in the left hand
side of the spec tuple from the index. Doing so cuts you down to
the 47 errors listed here:</p>
<p><a href=
"http://help.rubygems.org/discussions/problems/212-some-gems-and-specs-missing-that-are-in-the-index">
http://help.rubygems.org/discussions/problems/212-some-gems-and-spe...</a></p>
<p>I have not seen any 400s from my code, although when I was
drawing a significant amount of bandwidth I did seem to get
choked.</p></div>James Tuckertag:help.rubygems.org,2010-01-19:Comment/14732722010-09-03T00:10:13Z2010-09-03T00:10:13ZMore errors when mirroring rubygems<div><p>I am available to test the mirror gem code you are working on if that would help.</p></div>brianwellstag:help.rubygems.org,2010-01-19:Comment/14732722010-09-03T12:18:10Z2010-09-03T12:18:32ZMore errors when mirroring rubygems<div><p>It's up here, I've not had time to finish the integration and add coverage after a refactor, but I will be using this to replace the existing gem-mirror command in the (hopefully near) future. <a href="http://github.com/rubygems/rubygems-mirror">http://github.com/rubygems/rubygems-mirror</a></p>
<p>See <code>rake -T</code> for usage.</p></div>James Tuckertag:help.rubygems.org,2010-01-19:Comment/14732722010-09-04T22:01:19Z2010-09-04T22:01:19ZMore errors when mirroring rubygems<div><p>I tested out rubygems-mirror in my production environment and had to make a few changes so that it would work with a proxy server. These have just been sent as a pull request. <a href="http://github.com/rubygems/rubygems-mirror/pull/1">http://github.com/rubygems/rubygems-mirror/pull/1</a></p>
<p>I have some other ideas for improvements, but perhaps there is another place to talk about these other than in this problem report?</p></div>brianwellstag:help.rubygems.org,2010-01-19:Comment/14732722010-09-04T22:22:40Z2010-09-04T22:22:40ZMore errors when mirroring rubygems<div><p>Applied, thanks Brian!</p></div>James Tucker