Created
November 17, 2012 18:24
-
-
Save ipoerner/4098520 to your computer and use it in GitHub Desktop.
Shell script to deploy rbenv w/ ruby-build plugin
This file contains hidden or 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
#!/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