RVM is the acronym of Ruby enVironment Manager. It manages Ruby application environments and enables switching between them.
Homepage and more info: https://rvm.io/
RVM have dedicated Ubuntu package, so please follow instructions posted here: https://github.com/rvm/ubuntu_rvm
If you need a different (newer) version of RVM, after installing base version of RVM check the Upgrading section below.
Make sure you have following required packages installed:
curl
And then run:
\curl -sSL https://get.rvm.io | bash -s stable
Additional installation options and details about the installation process are described here: https://rvm.io/rvm/install
You can upgrade RVM any time by running:
rvm get VERSION
Where VERSION
should be replaced by one of the following values:
stable
- latest stable RVM (good for servers)master
- latest RVM (might not be stable)branch /path/branch
- branched version of RVM (for testing new features or bug fixes)
Additional upgrading options are described here: https://rvm.io/rvm/upgrading
Basic RVM usage scenarios include installing and switching between different ruby versions.
To install ruby you have to call rvm install INTERPRETER[-VERSION] OPTIONS
When no version specified, RVM will install latest stable version or selected interpreter. If you omit to specify interpreter, RVM will assume that you wanted to install MRI ruby. Following examples would have exactly the same effect:
rvm install ruby-2.3.1
rvm install ruby-2.3
rvm install 2.3.1
rvm install 2.3
Passing additional --default
option makes selected ruby your default.
We currently supported following ruby interpreters:
ruby
- MRI ruby (The Gold Standard)ironruby
- a .NET rubyjruby
- Java implementation of the rubymacruby
- implementation of ruby 1.9 directly on top of macOS core technologiesmaglev
- 64-bit implementation on top of VMware's GemStonemruby
- lightweight rubyopal
- ruby to JavaScript compilerrbx
- Rubinius - a next generation virtual machine VM for rubytopaz
- high performance ruby, written in RPython
Historical interpreters which you can still install with RVM, but are not anymore developed and supported by their authors:
ree
- Ruby Enterprise Edition - MRI Ruby with several custom patches for performance, stability, and memory
To switch between ruby versions you should call
rvm use INTERPRETER[-VERSION]
Same rules and options apply as for install
command with two special interpreters.
default
- default ruby (or the system ruby if a default hasn't been set)system
- system ruby (state before RVM was installed)
Additionally you might want list your preferred ruby version in .ruby-version
file stored in your project folder. This would cause automatic switch to selected ruby whenever you enter the folder.
RVM comes bundled with many different tools for managing your ruby environment. More detailed information about every commands listed below can be read after executing rvm help COMMAND
or browsing documentation on RVM homepage https://rvm.io/.
implode
- removes the rvm installation completely. This means everything in$rvm_path
(~/.rvm
||/usr/local/rvm
). This does not touch your profiles. However, this means that you must manually clean up your profiles and remove the lines which source RVMinstall
- install one or many ruby versionslist
- show currently installed rubies, interactive output - https://rvm.io/rubies/list/mount
- install rubies from external locationspatchset
- tools related to managing ruby patchsetspkg
- install a dependency package{readline,iconv,zlib,openssl}
- https://rvm.io/packages/reinstall
- reinstall ruby and runsgem pristine
on all gems. Make sure to read output. Useall
for all rubiesreload
- reload rvm source itself (useful after changing rvm source).remove
- uninstall one or many ruby versions and remove their sourcesrequirements
- installs additional OS specific dependencies/requirements for building various rubies (by default run byinstall
)reset
- remove current and stored default & system settingssnapshot
- lets you backup / restore an rvm installation in a lightweight manneruninstall
- uninstall one or many ruby versions, keeping their sourcesupgrade
- lets you upgrade from one version of a ruby to another, including migrating your gemsets semi-automatically
do
- runs an arbitrary command against specified and/or all rubiesuse
- setup current shell to use a specific ruby version
gemset
- manage gemsetsmigrate
- lets you migrate all gemsets from one ruby to another
alias
- define aliases forrvm use
autolibs
- control settings for installing dependencies automaticallycurrent
- print the current ruby version and the name of any gemset being usedgemdir
- display the path to the current gem directory (GEM_HOME
)group
- tools for managing groups in multiuser installationsrvmrc
- tools related to managing.rvmrc
trust and loadingwrapper
- generates a set of wrapper executables for a given ruby with the specified ruby and gemset combination. Used under the hood for passenger support and the like
cleanup
- remove stale source folders / archives and other miscellaneous data associated with rvmcron
- manage setup for using ruby in crondisk-usage
- display disk space occupied by RVMdocs
- tools to make installing ri and rdoc documentation easierfetch
- download binary or sources for selected ruby versionget
- upgrades RVM to latest head, stable or branched versionosx-ssl-certs
- helps update certificates for OpenSSL installed by rvm on OSX
config-get
- display values forRbConfig::CONFIG
variablesdebug
- show additional information helping to discover common issuesexport
- temporarily set an environment variable in the current shellfix-permissions
- repairs broken permissionsrepair
- lets you repair parts of your environment e.g. wrappers, env files and similar (e.g. general maintenance)rubygems
- switches the installed version of rubygems for the current rubytools
- provides general information about the ruby environment, primarily useful when scripting rvmunexport
- undo changes made to the environment byrvm export
user
- tools for managing RVM mixed mode in multiuser installations
info
- show the environment information for current rubynotes
- display notes with operating system specificsusage
- list available commands and their usage info (content of this README)version
- display rvm version (equal torvm -v
)
--debug
- toggle debug mode on for very verbose output--trace
- toggle trace mode on to see EVERYTHING rvm is doing--nice
- process niceness (increase the value on slow computers, default0
)-v
|--version
- display rvm version loaded for current shell
Here at RVM we get a high amount of bug reports, and often they are connected with specific environment settings which might be hard for us to replicate. That's why we would kindly ask you to follow the steps below so we can maximize our time helping you and minimize the time requesting more information.
We know, you hear this over and over and be rest assured we are working hard to improve the usability of https://rvm.io but we must always ask that you first please check the documentation if you are requesting a feature or if you are not sure if you did it right.
We try to release a new RVM as soon as we feel that we achieved certain stability. This might take a while and it could be the case that your issue has been already resolved in our development branch. Please get the latest RVM and try again:
rvm get master
If the documentation is not clear, an error message is not clear or you are stuck with the problem, please do file a bug.
When in doubt as to whether your issue might relate to another, simply file a new bug, and we will mark it as duplicate if it needs to be. It's always better to file a new ticket and let us sort it out than to accidentally add noise to another ticket.
For filing issues, we have prepared a template for you to use. Please try to fill all sections as best as you can. Always make sure to split up each command and its output into its own fenced code block. If the output is long, please put it in a separate gist. Otherwise it's hard for us to process all the information and respond quickly.
Note that if there is a lot of debug
or trace
output you can redirect it to a file with the >
character like rvm [command] > output.txt
.
You are very warmly welcome to help. Please follow our contribution guidelines
Any and all contributions offered in any form, past present or future are understood to be in complete agreement and acceptance with the Apache License v2.0.
Copyright (C) Michal Papis (2011-2017), Piotr Kuczynski (2016-2017), Wayne E. Seguin (2009-2011)
Licensed under the Apache License, Version 2.0