Thursday, August 12, 2010

Clean Ruby 1.9.2's remaining older gems manually

When I install Ruby 1.9.2 RC2, update gems and clean up older gems, but there are some remaining older gems like below:

> /opt/ruby-1.9.1/bin/gem update
> /opt/ruby-1.9.1/bin/gem cleanup
> /opt/ruby-1.9.1/bin/gem list

*** LOCAL GEMS ***

minitest (1.7.0, 1.6.0)
rake (0.8.7)
rdoc (2.5.9, 2.5.8)
test-unit (2.1.1)

What happened? In /opt/ruby-1.9.1/lib/ruby/gems/1.9.1/specifications directory, there are files like below:
> ls /opt/ruby-1.9.1/lib/ruby/gems/1.9.1/specifications
minitest-1.7.0.gemspec  minitest.gemspec  rake.gemspec  rdoc-2.5.9.gemspec  rdoc.gemspec  test-unit-2.1.1.gemspec

As you see, minitest.gemspec and rdoc.gemspec are remaining. So I remove manually and re-list gems.
> cd /opt/ruby-1.9.1/lib/ruby/gems/1.9.1/specifications
> rm minitest.gemspec rdoc.gemspec
> /opt/ruby-1.9.1/bin/gem list

*** LOCAL GEMS ***

minitest (1.7.0)
rake (0.8.7)
rdoc (2.5.9)
test-unit (2.1.1)

No comments:

Post a Comment