Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install won't work with multiple sources if one is unavailable #101

Closed
klauern opened this issue Jun 13, 2011 · 5 comments
Closed

gem install won't work with multiple sources if one is unavailable #101

klauern opened this issue Jun 13, 2011 · 5 comments

Comments

@klauern
Copy link

klauern commented Jun 13, 2011

Copied verbatim from issue #29170:

With the Amazon outage, one of the sources I had added outside of rubygems was down (http://rubygems.torquebox.org).
For me, this wasn't a big issue, since it hosts only a few gems that I use and I don't need updated that often. However,
when trying to install a gem or update gems, it would shut down entirely, not being able to find specs.4.8.gz for that
one source. So in effect, gem update was borked because one source wasn't available, regardless of the status of
all others.

Can this just display a warning or something saying something like "can't search ${borked gem server source},
skipping this one" and still try to update, install, etc., from any and all other sources listed?

@jrochkind
Copy link

Wonder if this is related to problem I just had, where couldn't install --pre gems until I REMOVED the 'old' gem sources from my default sources. Had to remove the old guys: http://gems.rubyforge.org/ http://gems.rubyonrails.org http://gems.github.com

I gather these are no longer to be used, but one woudln't expect having em in there anyway (along with http://rubygems.org) would prevent installation of gems that are present on http://rubygems.org. But my experience was that ordinarily it did not prevent installation, but it mysteriously DID when trying to install pre-release gem. Wonder if one of those repo's somehow represents as an 'outage' causing behavior noted in this ticket, but somehow only when installing --pre? At any rate, it was certainly confusing to figure out.

@klauern
Copy link
Author

klauern commented Jun 14, 2011

I found that if I do the following steps I can reproduce the error on v1.8.5 of Rubygems:

  1. gem server on one prompt
  2. gem source -a http://localhost:8808 on another prompt
  3. gem update same as step 2
  4. Ctrl+C the gem server terminal from step 1
  5. gem update from terminal on step 2

then you get a nice exception for most gem commands:

$ gem update
Updating installed gems
Updating middleman
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: middleman requires compass (= 0.11.2)

klauer@klauer-iMac ~
$ gem source -r http://localhost:8808
http://localhost:8808 removed from sources

klauer@klauer-iMac ~
$ gem update
Updating installed gems
Updating middleman
Fetching: padrino-core-0.9.29.gem (100%)
...

@klauern
Copy link
Author

klauern commented Jun 14, 2011

Now, I was also finding this when running a geminabox server, so I can rule out any confusion about running a gem server locally, too.

@davetron5000
Copy link
Contributor

Confirmed that this is an issue with 1.8.24.

gem sources
*** CURRENT SOURCES ***

http://rubygems.org/
http://geminabox.whatever.net/

geminabox.whatever.net is only available when I'm on my company's VPN, so a ping will know the IP address, presumably from having cached it before, but the host is unreachable until I connect to the VPN

@evanphx
Copy link
Member

evanphx commented Oct 7, 2012

The error, of erroring out when any source is missing, is fixed. The other issue, of timing out a source, is a separate issue.

@evanphx evanphx closed this as completed Oct 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants