How to Find and Install a Gem from RubyGems.org

Updated

RubyGems.org is the community gem host where you can search for a gem, open its page, and copy the install command shown there. To install, you need Ruby and the gem command (or Bundler for a project) already available on your machine. The site itself is a search and publishing front end; installation happens locally through the RubyGems or Bundler tooling.

Find a gem on the site

RubyGems.org's homepage presents a search box labeled Search Gems.... Type the gem name or a keyword and open the matching result.

On a gem's page, check these before installing:

  • Install command — the page shows the exact gem install line to run.
  • Version information — confirm which release you are about to get.
  • Dependencies — see what else will be pulled in.
  • Download count — the site tracks total downloads (the homepage reports 270,455,169,713 downloads and counting), which is a rough signal of how widely a gem is used.

Install with the gem command

  1. Open a terminal.
  2. Run the install command from the gem page, for example:
gem install GEM_NAME
  1. Expected result: RubyGems downloads the gem and its dependencies and reports that the gem was installed successfully.

To install a specific version, append it:

gem install GEM_NAME -v VERSION

Install with Bundler in a project

For a project, add the gem to your Gemfile and let Bundler resolve it:

gem "GEM_NAME"

Then run:

bundle install

Expected result: Bundler installs the gem and its dependencies and records them in your lockfile, so the same versions are used consistently.

Verify the installation

  • Run gem list GEM_NAME to confirm the gem is present locally.
  • In a project using Bundler, run bundle list or check the lockfile to confirm the resolved version.

Common snags

  • Command not found — the gem command is missing, which usually means Ruby isn't installed or isn't on your PATH.
  • Permission errors — installing into a system Ruby can require elevated permissions; a version manager or a project-local setup avoids this.
  • Version conflicts — if Bundler can't resolve dependencies, pin a compatible version in the Gemfile.

Where the service comes from

RubyGems.org is a community-run service overseen by Ruby Central and maintained by Ruby Central's Open Source Program and the RubyGems team. If you want to support its operation, the site points to a Supporter Program, sponsors, and donations to Ruby Central, the 501(c)(3) nonprofit behind RubyGems.org, RubyGems, and Bundler.