O'Reilly logo

Learning Ruby by Michael Fitzgerald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

RubyGems

RubyGems is a package utility for Ruby (http://rubyforge.org/projects/rubygems) written by Jim Weirich. It installs Ruby software packages and keeps them up to date. RubyGems is quite easy to learn and use—even easier than tools like the Unix/Linux tar utility (http://www.gnu.org/software/tar) or Java's jar utility (http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/jar.html).

For more information, read the RubyGems documentation at http://docs.rubygems.org/. The RubyGems User Guide (http://docs.rubygems.org/read/book/1) gives you most everything you need to know about using RubyGems. There is also a command Reference (http://docs.rubygems.org/read/book/2).

RubyGems likely was installed on your system when you installed Ruby. To make sure, type on Unix or Linux:

$ which gem
/usr/local/bin/gem

Or just check the version by typing:

$ gem -v
0.9.0

or:

$ gem --version
0.9.0

Tip

If you don't have RubyGems installed, go to Chapter 3 of the RubyGems User Guide at http://rubygems.org/read/chapter/3 for complete installation instructions.

Let's start from scratch—by getting help on how to issue RubyGems commands:

$ gem RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information. Usage: gem -h/--help gem -v/--version gem command [arguments...] [options...] Examples: gem install rake gem list --local gem build package.gemspec gem help install Further help: gem help commands list all 'gem' commands gem help examples show some examples ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required