Create Rubygems mirror, gem generate_index failed in stack level too deep

huacnlee's Avatar

huacnlee

09 Dec, 2011 10:47 AM

I want to create a full rubygems.org mirror in China, Because rubygems.org's backend store Amazon was be shielded by out GOV some times. so, we need a mirror server in China.
I was used rubygems-mirror to sync 150000+ gem files in my local server.
Then I use "gem generate_index /path/rubygems" common, waiting a long times, will result this error message:

/home/jason/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:129: stack level too deep (SystemStackError)

I was retry the again and again, and I was try to fix them, but in finally, it still can not process success.
pls help me.

  1. Support Staff 1 Posted by Nick Quaranto on 18 Dec, 2011 08:05 PM

    Nick Quaranto's Avatar

    Can you try with ruby 1.8.7?

    Also, have you tried this out?

    https://github.com/rubygems/rubygems-mirror

  2. 2 Posted by huacnlee on 19 Dec, 2011 02:55 AM

    huacnlee's Avatar

    @Nick Quaranto I was used rubygems-mirror to download that 150000+ gem files.
    And I had tried Ruby 1.8.7 and others Ruby versions, it both can't working.

  3. 3 Posted by huacnlee on 26 Dec, 2011 08:23 AM

    huacnlee's Avatar

    This is not need now, can use this gem to sync all files.
    https://github.com/huacnlee/rubygems-mirror

  4. 4 Posted by huacnlee on 26 Dec, 2011 08:23 AM

    huacnlee's Avatar
  5. Support Staff 5 Posted by Nick Quaranto on 11 Jan, 2012 02:53 PM

    Nick Quaranto's Avatar

    Cool, if you wouldn't mind submitting your patches upstream to @raggi it would help out everyone who runs mirrors. :)

  6. 6 Posted by João Duarte on 22 Feb, 2012 05:44 PM

    João Duarte's Avatar

    I'm getting the same error with 1.9.2. I've used rubygems-mirror to download the gems, but generate_index is still needed afterwards, no?

  7. 7 Posted by João Duarte on 22 Feb, 2012 05:53 PM

    João Duarte's Avatar

    Nevermind, did not notice it was a different repo that syncs the indexes. Still, this is a workaround..

  8. Support Staff 8 Posted by Evan Phoenix on 23 Feb, 2012 06:13 AM

    Evan Phoenix's Avatar

    Are you still having this problem using rubygems-mirror?

  9. 9 Posted by João Duarte on 23 Feb, 2012 09:37 AM

    João Duarte's Avatar

    rubygems-mirror solves the problem of making a full rubygems.org copy.
    I'm guessing though that if rubygems.org itself ever tries to fully reindex the gem collection it will run into this "stack level too deep" error in gem#generate_index.

  10. Support Staff 10 Posted by Evan Phoenix on 23 Feb, 2012 04:54 PM

    Evan Phoenix's Avatar

    rubygems.org has a custom indexer, so it won't ever run into this problem. That being said, this is likely a bug in generate_index and should be a bug on github.com/rubygems/rubygems/issues.

  11. Evan Phoenix closed this discussion on 23 Feb, 2012 04:54 PM.

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

Keyboard shortcuts

Generic

? 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