Ruby gems – a basic tip sheet

1. Check

Check if you have a local gem:

gem list –local builder

Check if there’s a remote gem:

gem list –remote builder

2. Install

e.g. for the Builder gem

gem install builder

Note, –no-rdoc avoids installing docs.

3. Enable

ruby -rubygems script.rb


export RUBYOPT=rubygems

4. Get Help

gem help

5. Run the Gem server

gem server

6. Remove Gems

gem uninstall rails

7. Other useful Gem commands

gem update

– updates all currently installed gems to their latest versions

gem env [option]

– shows RubyGems Environment information

gem spec gemname

– shows GemSpec data for a particular gem

Leave a Reply

Your email address will not be published. Required fields are marked *