Show Menu

rvm cheat sheet Cheat Sheet by

RVM cheat sheet from (only brought over the linux information)

RVM Cheat Sheet Info

Install curl and RVM

If it is not installed already, install

To check if it is installed, run the command
which curl
. If there is not output, run the following command:
apt-get install curl

curl -L | bash -s stable

close and reopen your terminal window after running this command. To make sure it installed and is available, type
which rvm
rvm --verion
; but only after reopening your terminal window.

Install Ruby

rvm install 1.9.3
Latest known patch level
rvm install 1.9.3 -j #
Parallel compile, replace # with number of CPU cores
rvm install 1.9.3 --patch falcon
Use a patch (falcon for perfor­mance)
rvm install 1.9.2-p318
Patch level 318
rvm install rbx --1.9
Rubinius with 1.9 mode set as default

Update RVM

rvm get stable
In case of problems try first with develo­pment version
(maybe it's already fixed):

rvm get head

Very old instal­lations might not support those update methods, just run the installer and reopen your terminal.

Install Ruby Depend­encies

Follow the instru­ctions from running:
rvm requir­ements

List Known Rubies

rvm list known

List All Rubies and Gemsets

ruby list
List rubies only
rvm list gemsets
List rubies and gemsets
rvm gemset list
List gemsets for current ruby

More Help is Available

So you got through it all....and it won't work!

Poosible Fix
Worked from
error: says
rvm use ...
won't work
in your terminal, type
/bin/bash --login
These are things you can do to try and solve your issue

Selecting Ruby for Work

rvm system
For system ruby with fallback to default
rvm use jruby
For current session only
rvm use --default 1.9.3
For current and new sessions
rvm use --ruby­-ve­rsion rbx
For current session and this project
RVM will automa­tically use a ruby and gemset when you
to a project directory.

Read more on project files:

- https:­//r­vm.i­o/­wor­kfl­ow/­pro­jec­ts/­#ru­by-­ver­sions

Using ruby and gems

After selecting Ruby work as usual:

ruby -v

gem install haml


Tempor­arily selecting another Ruby or gemset

rvm 1.8.7 do gem install rspec
in the given ruby
rvm 1.8.7,­1.9.2 do gem install haml
in these two rubies
rvm @global do gem install gist
in @global gemset of current ruby


RVM by default allows creating multiple enviro­nments for one ruby - called gemsets.

Gemsets can be specified together with ruby name using gemsets separa­tor(@):

- ruby-1.9.3­-p­125­@my­-pr­oject

During instal­lation of Ruby, RVM creates two gemsets:

- default - automa­tically selected when no @gemset specified: rvm use 1.9.3
- global - super gemset, inherited by all other gemsets for the given ruby

Working with gemsets

rvm use 1.8.7
use the ruby to manage gemsets for
rvm gemset create projec­t_name
create a gemset
rvm gemset use projec­t_name
use a gemset in this ruby
rvm gemset list
list gemsets in this ruby
rvm gemset delete projec­t_name
delete a gemset
rvm 1.9.1@­oth­er_­pro­jec­t_name
use another ruby and gemset
rvm 1.9.3@­_pr­oject --create --rvmrc
use and create gemset & .rvmrc


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          vim-rails Cheat Sheet
            Ruby on Rails Cheat Sheet by Dave Child and

          More Cheat Sheets by DeeJRoth

          Total Commander Button Bar Parameters Cheat Sheet
          Git on Webfaction Cheat Sheet