{"action":"opened","issue":{"url":"https://api.github.com/repos/rubygems/rubygems/issues/1613","repository_url":"https://api.github.com/repos/rubygems/rubygems","labels_url":"https://api.github.com/repos/rubygems/rubygems/issues/1613/labels{/name}","comments_url":"https://api.github.com/repos/rubygems/rubygems/issues/1613/comments","events_url":"https://api.github.com/repos/rubygems/rubygems/issues/1613/events","html_url":"https://github.com/rubygems/rubygems/issues/1613","id":154040987,"number":1613,"title":"Gem does not load sources","user":{"login":"kylekyle","id":226019,"avatar_url":"https://avatars.githubusercontent.com/u/226019?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekyle","html_url":"https://github.com/kylekyle","followers_url":"https://api.github.com/users/kylekyle/followers","following_url":"https://api.github.com/users/kylekyle/following{/other_user}","gists_url":"https://api.github.com/users/kylekyle/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekyle/subscriptions","organizations_url":"https://api.github.com/users/kylekyle/orgs","repos_url":"https://api.github.com/users/kylekyle/repos","events_url":"https://api.github.com/users/kylekyle/events{/privacy}","received_events_url":"https://api.github.com/users/kylekyle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-10T15:48:34Z","updated_at":"2016-05-10T15:48:34Z","closed_at":null,"body":"Ran into an interesting, but very reproducible problem today. I have a gemrc that only lists one source: \r\n\r\n> http://rubygems.local\r\n\r\nWhen I drop into pry, I see the following:\r\n\r\n```ruby\r\n[0] pry (main)> Gem.sources\r\n#<Gem::SourceList:0x0074325bad6234> @sources=[[Remote: https://rubygems.org/ API: https://rubygems.org]]>\r\n[1] pry (main)> Gem.sources\r\n#<Gem::SourceList:0x0074325bad6234> @sources=[[Remote: http://rubygems.local/ API: http://rubygems.local]]>\r\n```\r\n\r\nWhich is probably not good behavior. This behavior is consistent across a number of platforms and versions, but here's an example: \r\n\r\n```bash\r\n$ ruby --version \r\nruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]\r\n$ gem --version\r\n2.6.4\r\n```\r\n\r\nI hadn't noticed this until now because the `gem` utility always retries. So it gets the correct source list after the first try. But it too appears to always try `https://rubygems.org` first no matter what. "}}