Rubygems / gem notes

Notes about Rubygems, the Ruby package manager.

View installed gems

gem list

gem list [package]

View available updates

gem outdated

View gem versions available

To show the most recent version:

gem list --remote --versions

gem list [package] --remote --versions

To show all versions, add the –all flag:

gem list --remote --versions --all

gem list [package] --remote --versions --all

Install a particular gem version

gem install [package] -v [version]

E.g. gem install radiant -v 0.9.0

Gem is not installed

If you have a gem installed and it won’t uninstall, as follows…

bpc steph # gem list vlad

*** LOCAL GEMS ***

vlad (2.0.0)
vlad-git (2.1.0)
bpc steph # gem uninstall vlad
INFO:  gem "vlad" is not installed

…then try updating it first and then uninstalling:

bpc steph # gem update vlad
Updating installed gems
Updating vlad
Fetching: rake-remote_task-2.1.0.gem (100%)
Fetching: vlad-2.3.0.gem (100%)
Successfully installed rake-remote_task-2.1.0
Successfully installed vlad-2.3.0
Updating vlad-git
Fetching: vlad-git-2.2.0.gem (100%)
Successfully installed vlad-git-2.2.0
Gems updated: rake-remote_task, vlad, vlad-git
Installing ri documentation for rake-remote_task-2.1.0...
Installing ri documentation for vlad-2.3.0...
Installing ri documentation for vlad-git-2.2.0...
Installing RDoc documentation for rake-remote_task-2.1.0...
Installing RDoc documentation for vlad-2.3.0...
Installing RDoc documentation for vlad-git-2.2.0...
bpc steph # gem list vlad

*** LOCAL GEMS ***

vlad (2.3.0, 2.0.0)
vlad-git (2.2.0, 2.1.0)
bpc steph # gem uninstall vlad

You have requested to uninstall the gem:
vlad-git-2.2.0 depends on [vlad (>= 2.1.0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  Y
Successfully uninstalled vlad-2.3.0

However, this didn’t seem to work for all gems.

Instead, I had to uninstall rubygems, manually remove the gem directories then reinstall rubygems and all gems. Annoying.

I removed the following directories after uninstalling rubygems (on my 64 bit gentoo box):


Last modified: 26/11/2012 Tags: ,

Related Pages

Other pages possibly of interest:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top