# Gem update results in multiple versions

**URL:** <https://www.ruby-forum.com/t/gem-update-results-in-multiple-versions/152353>\
**Category:** Ruby\
**Created:** [November 3, 2008, 2:41am UTC](https://www.ruby-forum.com/t/gem-update-results-in-multiple-versions/152353 "2008-11-03T02:41:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davetron5000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a3d4f5/32.png) [@davetron5000](https://www.ruby-forum.com/u/davetron5000)\
**Post date:** [November 3, 2008, 2:41am UTC](https://www.ruby-forum.com/t/gem-update-results-in-multiple-versions/152353/1 "2008-11-03T02:41:08Z")

</div>

Working on some code I wish to distribute via gem. When I up the  
version and do a gem update my-code, gem reports that both the  
previous version and the new version are installed. This doesn’t seem  
to occur with any other gems that I have. I cannot seem to figure out  
what’s up with this.

Here’s my gemspec:

spec = Gem::Specification.new do |s|  
s.name = “My Proggy”  
s.version = “0.5.3”  
s.author = “David Copeland”  
s.email = “removed\_email\_address@domain.invalid”  
s.homepage = “[http://www.mystuff.com](http://www.mystuff.com)”  
s.platform = Gem::Platform::RUBY  
s.summary = “Some description”  
s.files = FileList[“{bin,lib}/**/\*“].to\_a  
s.require\_path = “lib”  
s.test\_files = FileList[”{test}/**/test\*.rb”].to\_a  
s.bindir = “bin”  
s.executables \<\< “cl”  
s.has\_rdoc = true  
s.rdoc\_options \<\< ‘–title’ \<\< ‘Titlet’ \<\< ‘–main’ \<\< ‘README.rdoc’  
s.extra\_rdoc\_files = [“README.rdoc”]  
end

When I changed from “0.5.3” to “0.5.4”, gem just installed it  
alongside the old version. Is there a way to tell it not to do that?

This happened installing the gem from a local .gem file AND from a  
remote repository.

---

<div class="post-metadata">

**Author:** ![davetron5000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a3d4f5/32.png) [@davetron5000](https://www.ruby-forum.com/u/davetron5000)\
**Post date:** [November 3, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/gem-update-results-in-multiple-versions/152353/2 "2008-11-03T15:00:56Z")

</div>

2008/11/3 davetron5000 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Working on some code I wish to distribute via gem. When I up the  
> version and do a gem update my-code, gem reports that both the  
> previous version and the new version are installed. This doesn’t seem  
> to occur with any other gems that I have. I cannot seem to figure out  
> what’s up with this.

It’s normal behaviour. It doesn’t hurt, since RubyGems  
loads the newest version anyway when no specific version  
is specified. And the old gem is still there in case another  
gem depends on this specific version.

You can uninstall the old version with:

```
gem uninstall gem-name -v some.version.number

```

Stefan
