12.04 & RVM - bootstraponline/meta GitHub Wiki

12.04 enables apport by default.

Purge apport

sudo apt-get purge -y apport

Install rvm deps

sudo apt-get install -y 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

curl -L https://get.rvm.io | bash -s stable --ruby

source ~/.rvm/scripts/rvm

rvm install 1.9.3-p392

rvm use --default 1.9.3

Confirm default is selected.

rvm list

Update RVM with

rvm get head

Install pry (irb replacement) and bundler. This step is optional.

gem install --no-rdoc --no-ri pry bundler json

Configure shell to run commands properly.

Edit -> Profiles -> Default -> Edit -> Title and Command -> Run command as a login shell

  • If pry fails to start, try opening a new shell.

Configure rubygems in RVM to not install rdoc or ri. The script below may be pasted into pry.

require 'fileutils' ;\
gemrc = Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE ;\
FileUtils.mkdir_p File.dirname gemrc ;\
File.open(gemrc, 'w') { |f| f.puts 'gem: --no-rdoc --no-ri' }

Prevent RVM is not a function errors.

rvm get stable --auto

Update gems

gem update; gem cleanup