Skip to content

Instantly share code, notes, and snippets.

@denstepa
Forked from m-gagne/rbenv-install.sh
Last active August 29, 2015 14:02
Show Gist options
  • Save denstepa/93140552f10dbd5e3a9f to your computer and use it in GitHub Desktop.
Save denstepa/93140552f10dbd5e3a9f to your computer and use it in GitHub Desktop.
# 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
#if fails
curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 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
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
#add user deplay
adduser deploy
passwd -l deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment