Ruby - Upgrading and Uninstalling Gems

Introduction

You can update gems easily via the following command.

gem update 

This makes RubyGems go to the remote gem repository, look for new versions of all the gems you currently have installed.

If there are new versions, install them.

To upgrade only a specific gem, suffix the preceding command line with the name of the gem.

To uninstall gems, use the uninstall command.

The following code uninstall feedtools

gem uninstall feedtools 

If there are multiple versions of the same gem on the machine, RubyGems will ask you which version you want to uninstall first.

$ gem uninstall rubyforge 

Select RubyGem to uninstall: 
1. rubyforge-0.3.0 
2. rubyforge-0.3.1 
3. All versions 

Related Topic