# Solving the error when running gem install or gem update

**URL:** <https://www.ruby-forum.com/t/solving-the-error-when-running-gem-install-or-gem-update/187290>\
**Category:** Rails\
**Created:** [April 21, 2010, 8:05am UTC](https://www.ruby-forum.com/t/solving-the-error-when-running-gem-install-or-gem-update/187290 "2010-04-21T08:05:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 21, 2010, 8:05am UTC](https://www.ruby-forum.com/t/solving-the-error-when-running-gem-install-or-gem-update/187290/1 "2010-04-21T08:05:48Z")

</div>

when seeing  
ERROR: While executing gem … (ArgumentError)  
uri scheme is invalid

try looking into your gem sources  
run  
gem sources

and then remove all weird or unnecessary sources  
until you are left with only [http://gems.rubyforge.org](http://gems.rubyforge.org)

then try to install or update a gem and you’ll hopefully not see this  
bug

i removed  
[http://gems.rubyonrails.org](http://gems.rubyonrails.org)  
[http://gems.github.com/](http://gems.github.com/)

which one of them caused the problem
