Cameron Carroll -- Code & Academic Blog

Ruby/RVM Quick Installation Reference


This is a (deprecated) guide to installing Ruby using RVM. I wrote it as a guide to get myself set up quickly in a development environment, but you should just see the RVM docs.


Lets begin:


Grab Ruby source:
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz

tar -xvf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
    

Check Ruby Download for a more recent version than p194.

Dependencies can be resolved manually by doing ./configure && make and checking to see what Ruby complains about in the compiler output. A much easier way would be to simply install RVM and run rvm requirements.


Install Ruby/RVM dependencies:
sudo yum install ncurses ncurses-devel gdbm-devel libffi-devel openssl-devel libyaml libyaml-devel readline-devel tk tk-devel patch bison autoconf automake

sudo yum install git gcc-c++ readline zlib zlib-devel make bzip2 libtool
    

The first set of packages are the requirements I divined from configuration and compiler output, before learning about rvm requirements. The second set are the remaining suggested requirements for my platform, which were either already installed or ultimately unnecessary.

Compile & install native Ruby
./configure 
make 
sudo make install 
      
Install RVM
curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
      
Use RVM to install Ruby and set as default:
rvm install ruby-1.9.3-head

rvm use ruby-1.9.3-head --default
      


In case you need to remove Ruby/RVM:

rvm implode
whereis ruby
rm -rf (files/directories listed in whereis ruby)
      

Ruby/RVM on Fedora


Dog wearing a Fedora
Originally Written:
March 3, 2012
Updated on:
July 23, 2012


References
Official RVM Installation Guide
Ruby Source Download

Photo by Sarah May Scott