-
-
Save jalogisch/1d748337aba505d99e1d 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
#!/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