How to Reinstall the Ruby Gems

How to Reinstall the Ruby Gems thumbnail
How to Reinstall the Ruby Gems

Ruby libraries, called gems, are often distributed using a special format and package-management program called gem. However, the command line, non-graphical user interface for the gem program can make it difficult to know how to perform some basic operations on gems, such as performing a reinstall.

Instructions

    • 1

      Open a command prompt. How to do this will vary a great deal depending on your operating system. In Windows, click "Start," "Run" and type "cmd" in the dialog that comes up. In Mac OS X, press "Cmd-Space" on the keyboard to open Spotlight, type "terminal" and press "Enter." The steps for opening a terminal in Linux varies a great deal depending on your flavor of Linux and configuration, so if you are unsure how, consult the documentation.

    • 2

      Uninstall the gem. This is necessary before you can reinstall the gem. Type the following into the command prompt:

      gem uninstall gem-name

      Replace "gem-name" with the name of the gem that you wish to reinstall. On Mac OS X and Linux machines, depending on your configuration, you may need to type the following instead to run the command with "superuser" access if the above command fails with a "write permissions" error:

      sudo gem uninstall gem-name

    • 3

      Reinstall the gem by typing the following:

      gem install gem-name

      Once again, you should replace gem-name with the name of the gem that you want to reinstall and if you are on a Mac OS X or Linux computer and are logged in as a normal user rather than as a system administrator, you will need to preface the line with the "sudo" command, like so:

      sudo gem install gem-name

Tips & Warnings

  • You can type "gem help commands" from the command line to get a list of all of the commands that you can use to interact with Ruby gems using the gem package manager.

  • If you simply wish to update your gems to the latest version, it usually is not necessary to reinstall the gems entirely. You can use "gem update" to update all of your gems automatically or "gem update gem-name" to update a selected gem.

Related Searches:

References

  • Photo Credit Jupiterimages/Photos.com/Getty Images

Comments

You May Also Like

  • How to Reinstall RubyGems

    RubyGems describes itself as the "premier ruby packaging system." RubyGems performs package management for the Ruby computer programming language and uses a...

  • How to Uninstall a Ruby Gem

    Features can be added to the Ruby programming language by downloading and installing special packages called gems. These packages are fetched from...

  • How to Reinstall Vomus

    The "vomus" option is a part of the "msiexec" command line utility for installing small updates to user software. You typically use...

  • How to Upgrade Ruby Gems

    Ruby is an open source, object oriented programming language. By creating different objects, called Gems, programmers can assemble software packages that are...

  • How to Uninstall Gems

    Ruby is a complex computer programming language that uses specially packaged self-contained programs or libraries. These libraries are called gems. Gems contain...

  • How to Install a Ruby Gem Git

    Git is a powerful tool used by developers to back up and host their software for others to view, modify and use....

  • How to Update Ruby Gems

    The Ruby programming language, originally developed by Yukihiro "Matz" Matsumoto, uses a program known as Ruby Gems to collect, distribute and install...

  • How to Build Ruby Gems

    Ruby is a programming language created by Japanese computer scientist Yukihiro Matsumoto. Ruby libraries are distributed using a centralized network and package...

  • How to Manually Install a Ruby Gem

    Gem is a package manager designed to make it easy to find, download, and install libraries for use by the Ruby programming...

Related Ads

Featured