Skip to content

Instantly share code, notes, and snippets.

@icqparty
Created February 17, 2015 01:17
Show Gist options
  • Save icqparty/0bbc39d958223d2e1382 to your computer and use it in GitHub Desktop.
Save icqparty/0bbc39d958223d2e1382 to your computer and use it in GitHub Desktop.
Install from source Ruby 2.2.0
Links: Homepage | Downloads
Dependencies: rbenv | OpenSSL
Version:
Get the Code
Switch to /usr/local/src and download the source package.
$cd /usr/local/src
$curl --remote-name http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz
Extract the archive and move into the folder.
$tar -xzvf ruby-2.2.0.tar.gz
$cd ruby-2.2.0
Compile and Install
Configure, compile and install into /usr/local/rbenv/versions/2.2.0.
$./configure \
--prefix=/usr/local/rbenv/versions/2.2.0 \
--with-opt-dir=/usr/local/openssl
$make
$make install
Set Version
Set the global ruby version to 2.2.0.
$rbenv global 2.2.0
To see all installed versions, use rbenv versions.
Update rbenv
Rehash the rbenv shims.
$rbenv rehash
Verify the Installation
To verify that you have correctly installed this version of Ruby.
$ruby --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment