[Rubygems-developers] removing a source

Eric Hodel drbrain at segment7.net
Wed Jan 23 16:41:56 EST 2008

On Jan 17, 2008, at 07:48 AM, Todd Fisher wrote:
> I'm having trouble removing a specific source within my local gem  
> repository.  Here's what I did.
> gem sources --add http://gems.myinternalhost.com:8808/
> Now later I'm in a place where I can no longer access  
> gems.myinternalhost.com:8808/  or it has gone down.  I'd like to  
> install a new gem from gems.rubyforge.org.  I can do this but the  
> only way I found was by adding the --source gems.rubyforge.org,  
> causing the operation to ignore all other sources.  But what I would  
> really like to do is remove the bad source...
> I've tried this:
> rm $GEM_HOME/source_cache
> rm -f $GEM_HOME/cache/*
> gem sources --remove http://gems.myinternalhost.com:8808/
> gem source --remove http://gems.myinternalhost.com:8808/
> Here's what I get:
> sudo gem source --remove http://gems.myinternalhost.com:8808/
> Bulk updating Gem source index for: http://gems.rubyforge.org
> ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
>     getaddrinfo: No address associated with nodename (SocketError)
>         getting size of http://gems.myinternalhost.com:8808/Marshal. 
> 4.8
>  gem --version
> 1.0.1
> Any ideas?

Does `gem sources -c` fix the problem?

More information about the Rubygems-developers mailing list