Skip to content

Instantly share code, notes, and snippets.

@matejvelikonja
Forked from jnx/rbenv-install-system-wide.sh
Last active December 20, 2015 01:19
Show Gist options
  • Save matejvelikonja/6047927 to your computer and use it in GitHub Desktop.
Save matejvelikonja/6047927 to your computer and use it in GitHub Desktop.
Installs Rbenv and with ruby 1.9.3-p448
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y install curl build-essential git-core
# Install rbenv and rbenv-build:
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# Add rbenv to the path:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
# Install Ruby:
RUBY_VERSION="1.9.3-p448"
rbenv install $RUBY_VERSION
rbenv global $RUBY_VERSION
# Rehash:
rbenv rehash
# Install all gems without ri and rdoc.
echo 'gem: --no-ri --no-rdoc' >> ~/.gemrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment