Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rubygems ignores -d option for generate_index #785

Closed
sheerun opened this Issue · 3 comments

2 participants

@sheerun

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_marshal_gemspecs
    build_modern_indicies if @build_modern

    compress_indicies
  end
end
@drbrain
Owner

I can't reproduce this:

$ gem list hike

*** LOCAL GEMS ***

$ ls ~/tmp/repo/gems/hike*
/Users/drbrain/tmp/repo/gems/hike-1.2.3.gem
$ rm ~/tmp/repo/latest_specs.4.8.gz 
$ gem generate_index -d ~/tmp/repo/
Generating Marshal quick index gemspecs for 29 gems
.............................
Complete
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", Gem::Version.new("1.2.3"), "ruby"],
@sheerun

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

@drbrain
Owner

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

@drbrain drbrain closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.