-
-
Save berga/913c4156064dfdd22d913304bc854033 to your computer and use it in GitHub Desktop.
rbenv install and system wide install on 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
# Update, upgrade and install development tools: | |
apt update | |
apt -y upgrade | |
apt -y install build-essential git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: | |
echo '# rbenv setup' > /etc/profile.d/rbenv.sh | |
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
chmod +x /etc/profile.d/rbenv.sh | |
source /etc/profile.d/rbenv.sh | |
# Install ruby-build: | |
git clone git://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
git clone https://github.com/rbenv/rbenv-default-gems.git /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