Skip to content

Instantly share code, notes, and snippets.

@rewinfrey
Created November 13, 2012 15:58
Show Gist options
  • Save rewinfrey/4066547 to your computer and use it in GitHub Desktop.
Save rewinfrey/4066547 to your computer and use it in GitHub Desktop.
RVM Gemset Roundup
Basic commands:
rvm gemset create <name>
rvm gemset list
rvm gemset use <name>
rvm gemset delete <name>
Global gemsets:
RVM provides @global gemset for each version of Ruby
Installing a gem to this gemset makes it available to all gemsets for that version of Ruby
Locating paths:
rvm gemdir
Entire library:
rvm gemset list_all
Empty a gemset:
rvm gemset empty <name>
Exporting a gemset: (three variants)
rvm 1.9.2@<name> do gemset export
rvm gemset export <name>
rvm gemset export <name>.gems (names the export file as <name>.gems)
Importing a gemset:
rvm --create 1.9.2-head@<name> (this creates a new gemset with <name> if the gemset does not already exist)
rvm gemset import <name>
A gemset file with the current gemset name prefix in the current directory
RVM then checks for 'default.gems' in the current directory
Next RVM looks for a 'system.gems' in the current directory.
Finally RVM looks for a '.gems' file in the current directory
Copy a gemset:
rvm gemset 1.8.7@rails3 1.9.2@rails3
(copies gemset associated with 1.8.7 rails 3 to 1.9.2 rails 3)
______________________________________________________________
.rvmrc (project directory)
rvm use ruby-1.9.2-p352@<name> --create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment