Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby

Shannon Skipper edited this page · 44 revisions

Ruby or MRI (Matz's Ruby Implementation), is the defacto Ruby and sets the standards for other Ruby implementations.

Requirements

Operating System Command
Debian / Ubuntu
sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev
RedHat / Fedora
sudo yum install -y gcc automake gdbm-devel libffi-devel libyaml-devel openssl-devel ncurses-devel readline-devel zlib-devel
openSUSE
sudo zypper install gcc automake gdbm-devel libffi-devel libyaml-devel openssl-devel ncurses-devel readline-devel zlib-devel
Arch Linux
sudo pacman -S base-devel libffi libyaml openssl zlib
FreeBSD
sudo pkg install gdbm libffi libyaml openssl readline
OS X
brew install gdbm libffi libyaml openssl readline

Installation

Note: MRI requires OpenSSL >= 1.0.1.

wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.bz2
tar -xjvf ruby-2.2.1.tar.bz2
cd ruby-2.2.1
./configure --prefix=/opt/rubies/ruby-2.2.1
make
sudo make install

Note: OS X users must update their OpenSSL CA cert bundle and properly set ./configure --with-opt-dir to compile against Homebrew's libraries:

wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.bz2
tar -xjvf ruby-2.2.1.tar.bz2
cd ruby-2.2.1
./configure --prefix="$HOME/.rubies/ruby-2.2.1" --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm):$(brew --prefix libffi)"
make
sudo make install
Something went wrong with that request. Please try again.