Skip to content

Instantly share code, notes, and snippets.

@pboksz
Last active December 24, 2024 21:49
Show Gist options
  • Save pboksz/4649025 to your computer and use it in GitHub Desktop.
Save pboksz/4649025 to your computer and use it in GitHub Desktop.
How to install Ruby with RVM based on @sickill's blog post

Installing Ruby using RVM

Remove RVM from apt-get (possibly)

$ apt-get --purge remove ruby-rvm
$ sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh

Install RVM

Make sure you have curl command installed:

$ apt-get install curl

Install stable RVM version by piping installation script to bash:

$ curl -L get.rvm.io | bash -s stable

Change shell options

Open your shell config and go to "Title and Command" and check the option

Run command as a login shell

Install requirements

See what are requirements for compiling MRI:

$ rvm requirements

Most likely it is the following list of packages:

$ apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

Install Ruby

Now, install ruby via RVM:

$ rvm install 1.9.3

Make it a default for all new shells:

$ rvm --default use 1.9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment