Forked from v1nc3ntlaw/rbenv-install-system-wide.sh
Created
January 11, 2013 13:46
-
-
Save isa/4510780 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# Run as root | |
# $ bash <(curl -s https://raw.github.com/gist/1631411) | |
# | |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential git-core curl \ | |
libssl-dev \ | |
libyaml-dev \ | |
libsqlite3-dev \ | |
libreadline-dev \ | |
zlib1g zlib1g-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev \ | |
libxslt-dev libxml2-dev | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: | |
echo '# rbenv setup' > /etc/profile.d/rbenv.sh | |
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
chmod +x /etc/profile.d/rbenv.sh | |
source /etc/profile.d/rbenv.sh | |
# Install ruby-build: | |
pushd /tmp | |
git clone git://github.com/sstephenson/ruby-build.git | |
cd ruby-build | |
./install.sh | |
popd | |
# Install Ruby 1.9.3-p327: | |
rbenv install 1.9.3-p327 | |
rbenv global 1.9.3-p327 | |
# Rehash: | |
rbenv rehash | |
# Production install gems skipping ri and rdoc | |
echo "gem: --no-ri --no-rdoc" >> /root/.gemrc | |
# Restart shell | |
exec $SHELL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment