To install RVM, but be sure to double check with the RVM installation instructions
sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Note that using sudo or being logged in to the root account will install RVM system-wide (i.e. for all users/apps), which is probably what you want.
Also, you can decide for each rails app what ruby version and gemset it will use by creating a .rvmrc in the app's root (i.e. Rails.root) folder.
rvm requirements
then compare the output to the libraries and build tools that were installed during add packages, libraries, and build tools needed by other software installations on the wiki home page.
The rails app should run as a particular user (not root) and that user should be added to the rvm group:
sudo adduser the_user_your_rails_app_will_be_running_as rvm
When various ruby scripts run as services (i.e. in the background) there is no one there to answer the rvm question 'do you trust this .rvmrc file?'.
A global setting is needed to trust all .rvmrc files in the rails apps, so edit the /etc/rvmrc file:
sudo nano /etc/rvmrc
then add the following line:
rvm_trust_rvmrcs_flag=1
and save. Without this change, processes such as Passenger, Thin, Unicorn, cron, and so on will silently hang and such errors are hard to detect.
From this point forward, avoid doing any rvm commands as root or sudo instead do all commands as the_user_your_rails_app_will_be_running_as.
rvm list known
rvm install ruby-2.0.0
rvm --default use 2.0.0
rvm gemset use global
rvm gemset name ... verify the gemset is global
gem install bundler --no-ri --no-rdoc
gem install foreman --no-ri --no-rdoc
Optionally you may want to install one of these app servers:
gem install passenger --no-ri --no-rdoc
gem install thin --no-ri --no-rdoc
gem install unicorn --no-ri --no-rdoc
To list the gems installed in the global gemset do:
gem list
rvm implode ... or ... rvmsudo implode ... if rvm alone doesn't work