Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
rbenv install and system wide install on Ubuntu 16.04 LTS.
# Update, upgrade and install development tools:
apt update
apt -y upgrade
apt -y install build-essential git-core
# Install rbenv
git clone git:// /usr/local/rbenv
# Add rbenv to the path:
echo '# rbenv setup' > /etc/profile.d/
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/
chmod +x /etc/profile.d/
source /etc/profile.d/
# Install ruby-build:
git clone git:// /usr/local/rbenv/plugins/ruby-build
git clone /usr/local/rbenv/plugins/rbenv-default-gems
echo bundler >> /usr/local/rbenv/default-gems
# Install Ruby:
rbenv install 2.4.2
rbenv global 2.4.2
# Rehash:
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.