More errors when mirroring rubygems

brianwells's Avatar


16 Apr, 2010 01:31 PM

In addition to the '403 Forbidden' errors I was seeing on certain gems, yesterday I started getting endless '400 Bad Request' errors.

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:

#<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=">=">], @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>`

This specification causes gem mirror to attempt fetching, which does not exist. The proper URL would be with the Java platform properly indicated.


-- Brian Wells

  1. Support Staff 1 Posted by Nick Quaranto on 23 Apr, 2010 05:03 AM

    Nick Quaranto's Avatar

    Hi there,

    It's on my list to run through all the gems and make it's working, we've gotten several reports of gem mirror not working as expected. Can you just visit that page and download it if you need it?

  2. 2 Posted by Lamont on 03 Jul, 2010 04:51 PM

    Lamont's Avatar

    Same here, lots of 400s and a few 403s on a gem mirror.

    Using ruby-1.8.7 and gem 1.3.7

  3. 3 Posted by James Tucker on 07 Jul, 2010 10:32 AM

    James Tucker's Avatar

    There are some bugs in gem mirror 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 gem mirror in its present state generates. In it's present state gem mirror uses spec.gem_file, when it should be using the full_name field in the left hand side of the spec tuple from the index. Doing so cuts you down to the 47 errors listed here:

    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.

  4. 4 Posted by brianwells on 03 Sep, 2010 12:10 AM

    brianwells's Avatar

    I am available to test the mirror gem code you are working on if that would help.

  5. 5 Posted by James Tucker on 03 Sep, 2010 12:18 PM

    James Tucker's Avatar

    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.

    See rake -T for usage.

  6. 6 Posted by brianwells on 04 Sep, 2010 10:01 PM

    brianwells's Avatar

    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.

    I have some other ideas for improvements, but perhaps there is another place to talk about these other than in this problem report?

  7. 7 Posted by James Tucker on 04 Sep, 2010 10:22 PM

    James Tucker's Avatar

    Applied, thanks Brian!

  8. Nick Quaranto closed this discussion on 18 Mar, 2011 08:19 PM.

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