How do I install a Ruby Gem?

Overview

Ruby Gems are are collections of functions that allow you to perform tasks in Ruby. You will need to install a Gem before you can use it inside a Ruby program. This guide will show you how to install your own Ruby Gems, see existing gems installed, and even view documentation for those gems

Gems are installed directly from the RubyForge repository.

The Ruby Gems Management Page
You will need to login to the control panel and click the Ruby Gems icon to get to the Ruby Gems management page. From here you can perform all of the operations listed below.

Steps

Install a Gem

To install a gem, simply type the name of the gem and click Install Now. You can also search for gems and see available ones by using the buttons above the Install Now button. 

Update, Reinstalling, and Removing Gems

You can update, reinstall, remove, and browse the documentation for a gem once it is installed by clicking on the appropriate buttons at the bottom of the Ruby Gems management page.

Checking Existing System-Wide Gems

You can click "Show System Installed Modules" to see a list of gems installed on the system. It is usually preferable to use these gems if possible. On all of our servers we have the basic Rails gems installed, along with a list of very commonly used gems. 

  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

How do I deploy a Ruby on Rails environment?

Overview Ruby on Rails is an open source web application framework for the Ruby programming...

How do I create a Ruby on Rails application?

Overview Below are instructions on how to create a Ruby on Rails test application and writing a...