Skip to content

Instantly share code, notes, and snippets.

@ealden
Last active October 10, 2017 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ealden/a8849293bf96a3aed0b37fc345cb3e25 to your computer and use it in GitHub Desktop.
Save ealden/a8849293bf96a3aed0b37fc345cb3e25 to your computer and use it in GitHub Desktop.
Ruby install in Ubuntu 16.04 LTS
# 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