Forked from v1nc3ntlaw/rbenv-install-system-wide.sh
Created
February 14, 2012 21:36
-
-
Save follmann/1830657 to your computer and use it in GitHub Desktop.
rbenv install on Debian 6 Squeeze
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
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core curl | |
apt-get -y install libssl-dev | |
apt-get -y install libreadline5 libreadline5-dev | |
apt-get -y install zlib1g zlib1g-dev | |
# for passenger needed | |
apt-get -y install libcurl4-openssl-dev | |
# for ruby gem nokogiri needed | |
apt-get -y install 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.2-p290: | |
rbenv install 1.9.2-p290 | |
rbenv global 1.9.2-p290 | |
# Rehash: | |
rbenv rehash | |
# Production installing gems skipping ri and rdoc | |
cat << EOF > .gemrc | |
--- | |
:sources: | |
- http://gems.rubyforge.org | |
- http://gems.github.com | |
gem: --no-ri --no-rdoc | |
EOF | |
# Restart shell | |
exec $SHELL |
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
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv: | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
# 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-build: | |
pushd /tmp | |
git clone git://github.com/sstephenson/ruby-build.git | |
cd ruby-build | |
./install.sh | |
popd | |
# Install Ruby 1.9.2-p290: | |
rbenv install 1.9.2-p290 | |
rbenv global 1.9.2-p290 | |
# Rehash: | |
rbenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment