Skip to content

Instantly share code, notes, and snippets.

@m-gagne
Forked from jnx/rbenv-install-system-wide.sh
Last active May 27, 2019 00:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save m-gagne/9234940 to your computer and use it in GitHub Desktop.
Save m-gagne/9234940 to your computer and use it in GitHub Desktop.
Set's up local user rbenv with Ruby 2.0.0
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Add rbenv to the path:
echo 'export RBENV_ROOT=~/.rbenv' >> ~/.bash_profile
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
eval "$(rbenv init -)"
# Install ruby-build:
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build
sudo ./install.sh
# Install Ruby 2.0.0-p247:
~/.rbenv/bin/rbenv install 2.0.0-p451
~/.rbenv/bin/rbenv global 2.0.0-p451
# Install bundler:
gem install bundler
# Rehash:
~/.rbenv/bin/rbenv rehash
# Restart nginx:
sudo service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment