Setup RVM and Ruby

I’m putting this here so that I have it saved. I’ve done this many times and until I automate it with a Puppet or Chef script….

Install curl

sudo apt-get install curl

Install RVM (forgot this, thanks Jasdeep)

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

Reload .bash_profile

. ~/.bash_profile

Run rvm requirements to see what needs to be installed

rvm requirements
...
Requirements for ubuntu/12.10/x86_64

NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
             This is the *original* / standard Ruby Language Interpreter
      'ree'  represents Ruby Enterprise Edition
      'rbx'  represents Rubinius

Additional Dependencies:
# For update-system:
sudo apt-get update

# For rvm:
sudo apt-get --no-install-recommends install bash curl git patch bzip2

# For ruby:
sudo apt-get --no-install-recommends 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 libgdbm-dev ncurses-dev automake libtool bison \
subversion pkg-config libffi-dev

# For jruby:
sudo apt-get --no-install-recommends install curl g%2B%2B openjdk-6-jre-headless

Install everything you need

sudo 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 pkg-config libffi-dev

Install Ruby

rvm install 1.9.3
...
Searching for binary rubies, this might take some time.
ruby-1.9.3-p392 - #configure
ruby-1.9.3-p392 - #download
#############################################                             62.9%

Begin to use ruby

rvm use 1.9.3
...
Using /home/vagrant/.rvm/gems/ruby-1.9.3-p392

Check your Ruby version

ruby -v
...
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

Set your default ruby version

rvm --default use 1.9.3-p327
...
Using /home/vagrant/.rvm/gems/ruby-1.9.3-p392

As [Jasdeep][2] says in the comments, it is worth knowing that you’ll need a javascript runtime to use Rails so you might as well install nodejs (because it is fun):

sudo apt-get install nodejs

Jason Meridth

jmeridth

My name is Jason Meridth. I am a continuously learning senior software developer/devops/team lead/development manager trying to not let best be the enemy of better. I reserve the right to change my mind upon obtaining more information. I am also the owner and principal software consultant at Meridth, LLC. If you have any software, hardward, networking, process, etc needs please don't hesitate to reach out to me.

Raspberry Pi Kubernetes Cluster - Part 2

Howdy again.Alright, my 8 port switch showed up so I was able to connect my raspberry 3B+ boards to my home network. I plugged it in wit...… Continue reading

Raspberry Pi Kubernetes Cluster - Part 1

Published on April 07, 2018

SSH - Too Many Authentication Failures

Published on March 28, 2018