Forked from scmx/upgrade-install-ruby-2-1-2-ubuntu-12-04.md
Last active
April 6, 2016 07:51
-
-
Save kenpb/733eac7bb600749a3f48f4f80303cc4e to your computer and use it in GitHub Desktop.
Upgrade/Install ruby 2.2.2 #ubuntu #12.04 #14.04 for vagrant
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
# Reference http://stackoverflow.com/a/18490935/2037928 | |
sudo apt-get update --fix-missing | |
# Install needed packages | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/ | |
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz | |
# Unpack | |
tar -xvzf ruby-2.2.2.tar.gz | |
cd ruby-2.2.2/ | |
# Compile from source | |
./configure --prefix=/usr/local | |
sudo make | |
sudo make install | |
# Make sure deploy user has access to installing gems | |
sudo chown -R deploy:vagrant /usr/local/bin | |
sudo chown -R deploy:vagrant /usr/local/lib/ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment