Skip to content

Instantly share code, notes, and snippets.

@tony4d

tony4d/ruby-from-source.sh

Last active Aug 29, 2015
Embed
What would you like to do?
Compile ruby from source for rbenv on OS X
# Assumptions:
# - You are using rbenv, installed in ~/.rbenv
# - You are using homebrew
# - You want to install ruby 2.1.2 (for example)
#
# Make sure you have openssl installed first
brew install openssl
# Before you begin, download ruby source from https://www.ruby-lang.org/en/downloads/
tar -zxvf ruby-2.1.2.tar.gz
cd ruby-2.1.2
./configure --prefix=`echo ~`/.rbenv/versions/2.1.2 --with-openssl-dir=`brew --prefix openssl`
make
make install
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment