Saturday, July 31, 2010

Install RVM system wide on Ubuntu Server

1: Install git if you don't already have it

$ sudo apt-get install git-core

2: Download RVM

$ sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )

This creates /usr/local/rvm and the group 'rvm'

3: Add each user to group rvm

$ sudo usermod -aG rvm ubuntu

4: Add startup lines to each user's .profile

[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'

5: Add this line to /etc/rvmrc (may not be necessary)

$ echo "export rvm_path=/usr/local/rvm" > /etc/rvmrc

6: Use rvm as a user - best to logout/login first to make sure you get all the paths etc setup

$ rvm list
$ rvm package install zlib ( I needed this to get install to work )
$ rvm install 1.9.2 --with-zlib-dir=/usr/local/rvm/usr

To set default ruby version

$rvm --default use 1.9.2

No comments:

Post a Comment