Last active
October 10, 2017 22:19
-
-
Save ealden/a8849293bf96a3aed0b37fc345cb3e25 to your computer and use it in GitHub Desktop.
Ruby install in Ubuntu 16.04 LTS
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 dependencies as root | |
apt install -y git build-essential libssl-dev libreadline-dev zlib1g-dev | |
# Install rbenv | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install ruby-build | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# Install latest Ruby and set it as global | |
rbenv install 2.4.2 | |
rbenv global 2.4.2 | |
# Install bundler as we always need it | |
gem install bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment