1. Computing

What is RVM?

By

RVM is the Ruby Version Manager. It allows you to install and manage several different versions and implementations of Ruby on one computer, including the ability to manage different sets of RubyGems one each.

At first, RVM sounds like kinds of niche tool. Only people who need to test their software on all types of Ruby implementations should need this, right? It turns out it's much more useful than this, and can break you out of any version of Ruby your distribution locks you to. It could very well replace how most Linux and OSX users install Ruby altogether.

Testing Across Multiple Versions

RVM allows you to run your unit tests on multiple versions of Ruby with a single command. This is really handy, allowing you to ensure your software works on 1.8.6, 1.8.7 and 1.9.1, as well as other implementations such as Ruby Enterprise Edition and JRuby. Summaries can also be printed in YAML or JSON so they can be easily formatted and displayed.

Multiple Implementations

In addition to the standard MRI implementation, RVM also supports a multitude of MRI variants and alternative implementations. At the time of this writing, the following are supported.

  • Rubinius
  • JRuby
  • Ruby Enterprise Edition
  • MagLev
  • IronRuby
  • MacRuby
  • URABE Shyouhei (mput)'s Ruby

GemSets

While RVM will automatically set up a new GemSet for each Ruby you install, you can also manipulate them manually for more control. For instance, in the default GemSet for 1.8.7, you can install the latest stable version of Rails. Then, in 1.8.7@railsedge, you can install Rails Edge (the latest development version of Rails). You can then switch between them easily, and even run your tests on both with a single command.

GemSets can be explicitly created, exported, imported, copied to other gemsets, etc. Using GemSets, you can easily manage multiple versions of gems.

  1. About.com
  2. Computing
  3. Ruby
  4. Advanced Ruby
  5. Ruby Version Manager
  6. What is RVM?

©2014 About.com. All rights reserved.