Forked from murphyslaw/ubuntu-install-ruby-1.8.7.sh
Created
February 2, 2017 15:34
-
-
Save konung/f45668a95a54e0f590e5b73ca968116a to your computer and use it in GitHub Desktop.
Install Ruby 1.8.7 with rbenv on Ubuntu
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
# Install system libraries. | |
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core | |
# Install rbenv. | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
# Setup bash. | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
# Install rbenv plugins. | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# Install Ruby version 1.8.7. | |
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/include/openssl" rbenv install 1.8.7-p370 | |
# Update shims. | |
rbenv rehash | |
# Set global (default) Ruby version. | |
rbenv global 1.8.7-p370 | |
# Test Ruby version. | |
rbenv which ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment