Gem sources in paths don't work

Chris Lloyd's Avatar

Chris Lloyd

08 Jan, 2011 11:57 AM

If I do "gem sources -a" the command fails because Rubygems searches for instead of`. Whilst I understand why it would do this, I believe the correct behaviour would be concat the path.

This boils down to line 239 of spec_fetcher.rb with the URI instance. + is really an alias for merge, which isn't really the behavior you want here.

  1. Support Staff 1 Posted by Nick Quaranto on 18 Jan, 2011 03:51 AM

    Nick Quaranto's Avatar

    Ugh :( The gem server code is such a pain. Patches are certainly welcome for this!

  2. Support Staff 2 Posted by Nick Quaranto on 18 Jan, 2011 03:52 AM

    Nick Quaranto's Avatar

    That being said, maybe geminabox or stickler will treat this right. Let me know if either of these work.

  3. 3 Posted by Chris Lloyd on 18 Jan, 2011 05:03 AM

    Chris Lloyd's Avatar

    The problem is with the Rubygems CLI not the server code (Phewf!). The offending code is pretty simple and the fix would probably look like:

    spec_path = source_uri.dup
    spec_path.path += "/#{file_name}.gz"

    Though that is totally untested. Probably would also have to check for the case where the source_uri ends in a slash. I would submit a patch but my laptop is in the mothership :(

  4. Support Staff 4 Posted by Nick Quaranto on 27 May, 2011 12:25 AM

    Nick Quaranto's Avatar

    Wow, this ticket hasn't been updated in forever. That class has had a lot of changes but would still accept patches for this. Hit us with a pull request please! :)

  5. Nick Quaranto closed this discussion on 27 May, 2011 12:25 AM.

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