gem update results in multiple versions

Discussion in 'Ruby' started by davetron5000, Nov 3, 2008.

  1. davetron5000

    davetron5000 Guest

    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 = ""
    s.homepage = "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.
     
    davetron5000, Nov 3, 2008
    #1
    1. Advertising

  2. davetron5000

    Stefan Lang Guest

    2008/11/3 davetron5000 <>:
    > 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
     
    Stefan Lang, Nov 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephan Mueller

    gem update for additional gem servers?

    Stephan Mueller, Nov 19, 2006, in forum: Ruby
    Replies:
    3
    Views:
    103
    Jan Svitok
    Nov 20, 2006
  2. Austin 7873
    Replies:
    5
    Views:
    198
    Eric Hodel
    Jan 27, 2007
  3. Mike Nicholaides
    Replies:
    3
    Views:
    96
    Mike Nicholaides
    Mar 28, 2008
  4. Nasir Khan
    Replies:
    0
    Views:
    110
    Nasir Khan
    Jun 8, 2009
  5. Älphä Blüë

    Gem versions and Gem lists different after update

    Älphä Blüë, Jul 22, 2009, in forum: Ruby
    Replies:
    1
    Views:
    137
    Älphä Blüë
    Jul 22, 2009
Loading...

Share This Page