Created
December 1, 2011 14:56
-
-
Save antage/1417345 to your computer and use it in GitHub Desktop.
System wide install rbenv on Debian
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
#!/bin/bash | |
# per-user install | |
echo 'if [ -z "$(type rbenv 2> /dev/null | head -1 | grep function)" ]; then' >> ~/.bashrc | |
echo ' export RBENV_ROOT=/usr/local/rbenv' >> ~/.bashrc | |
echo ' export PATH=$RBENV_ROOT/bin:$PATH' >> ~/.bashrc | |
echo ' eval "$(rbenv init -)"' >> ~/.bashrc | |
echo 'fi' >> ~/.bashrc |
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
#!/bin/bash | |
apt-get -y install build-essential git-core zlib1g-dev libssl-dev libreadline6-dev | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# system wide install | |
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 | |
ln -s /usr/local/rbenv/completions/rbenv.bash /etc/bash_completion.d/rbenv | |
source /etc/profile.d/rbenv.sh | |
git clone git://github.com/sstephenson/ruby-build.git /tmp/ruby-build | |
cd /tmp/ruby-build | |
PREFIX=/usr/local/rbenv ./install.sh | |
cd .. | |
rm -rf /tmp/ruby-build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot :)