Rubygems ignores -d option for generate_index #785

sheerun opened this Issue Jan 13, 2014 · 3 comments


None yet

2 participants

sheerun commented Jan 13, 2014

It doesn't matter what gems are in gems directory. It always compiles index for system gems. It also doesn't work from Ruby API. My quick monkeypatch:

class HackedIndexer < Gem::Indexer
  def build_indicies
    # ----
    # Gem::Specification.dirs = []
    # Gem::Specification.add_specs(*map_gems_to_specs(gem_file_list))
    # ++++
    Gem::Specification.all = map_gems_to_specs(gem_file_list) # This line
    # ----

    build_modern_indicies if @build_modern

drbrain commented Jan 13, 2014

I can't reproduce this:

$ gem list hike

*** LOCAL GEMS ***

$ ls ~/tmp/repo/gems/hike*
$ rm ~/tmp/repo/latest_specs.4.8.gz 
$ gem generate_index -d ~/tmp/repo/
Generating Marshal quick index gemspecs for 29 gems
Generated Marshal quick index gemspecs: 0.012s
Generating specs index
Generated specs index: 0.001s
Generating latest specs index
Generated latest specs index: 0.001s
Generating prerelease specs index
Generated prerelease specs index: 0.000s
Compressing indicies
Compressed indicies: 0.001s
$ ri --dump ~/tmp/repo/latest_specs.4.8 | grep hike
 ["hike","1.2.3"), "ruby"],
sheerun commented Jan 13, 2014

For some reason it happens only on my production server. I'll try to give you some steps.

drbrain commented May 28, 2014

Closing due to lack of feedback. Please reopen if you have steps to reproduce.

@drbrain drbrain closed this May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment