Last active
August 29, 2015 14:02
-
-
Save tony4d/fbe7e362af1df20ac750 to your computer and use it in GitHub Desktop.
Compile ruby from source for rbenv on OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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