Cheatography
https://cheatography.com
RVM cheat sheet from errtheblog.com (only brought over the linux information)
RVM Cheat Sheet InfoOriginally Posted: | | RVM Homepage: | |
Install curl and RVMIf it is not installed already, install curl .
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 get.rvm.io | bash -s stable
close and reopen your terminal window after running this command. To make sure it installed and is available, type which rvm or rvm --verion ; but only after reopening your terminal window. |
Install Rubyrvm 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 performance) | rvm install 1.9.2-p318
| Patch level 318 | rvm install rbx --1.9
| Rubinius with 1.9 mode set as default |
Update RVMIn case of problems try first with development version
(maybe it's already fixed):
rvm get head
Very old installations might not support those update methods, just run the installer and reopen your terminal.
Install Ruby DependenciesFollow the instructions from running: rvm requirements |
List All Rubies and Gemsetsruby list
| List rubies only | rvm list gemsets
| List rubies and gemsets | rvm gemset list
| List gemsets for current ruby |
More Help is Availablein your terminal: rvm help | | |
So you got through it all....and it won't work!Error | Poosible Fix | Worked from | error: says rvm use ... won't work | in your terminal, type /bin/bash --login | LXTerminal |
These are things you can do to try and solve your issue
| | Selecting Ruby for Workrvm 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-version rbx
| For current session and this project |
Using ruby and gemsAfter selecting Ruby work as usual:
ruby -v
gem install haml
haml |
Temporarily selecting another Ruby or gemsetrvm 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 |
GemsetsRVM by default allows creating multiple environments for one ruby - called gemsets.
Gemsets can be specified together with ruby name using gemsets separator(@):
- ruby-1.9.3-p125@my-project
During installation of Ruby, RVM creates two gemsets:
- default - automatically selected when no @gemset specified: rvm use 1.9.3
- global - super gemset, inherited by all other gemsets for the given ruby |
Working with gemsetsrvm use 1.8.7
| use the ruby to manage gemsets for | rvm gemset create project_name
| create a gemset | rvm gemset use project_name
| use a gemset in this ruby | rvm gemset list
| list gemsets in this ruby | rvm gemset delete project_name
| delete a gemset | rvm 1.9.1@other_project_name
| use another ruby and gemset | rvm 1.9.3@_project --create --rvmrc
| use and create gemset & .rvmrc |
|
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by DeeJRoth