Skip to content

Instantly share code, notes, and snippets.

@ipoerner
Created November 17, 2012 18:24
Show Gist options
  • Save ipoerner/4098520 to your computer and use it in GitHub Desktop.
Save ipoerner/4098520 to your computer and use it in GitHub Desktop.
Shell script to deploy rbenv w/ ruby-build plugin
#!/bin/sh
set -e # Exit script immediately on first error.
set -x # Print commands and their arguments as they are executed.
# Update Debian package index.
sudo apt-get update -y
# Install required Debian packages.
sudo apt-get install -y build-essential git-core wget zlib1g-dbg libssl-dev libreadline-dev libopenssl-ruby
# Get and install rbenv from GitHub
rm -rf ~/.rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Get and install ruby-build from GitHub
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment