Created
February 3, 2012 02:52
-
-
Save kyanny/1727338 to your computer and use it in GitHub Desktop.
system-wide installation rbenv + ruby-build @/usr/local
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
MY_GROUP="" | |
if [ "$MY_GROUP" = "" ] ; then | |
echo '!!! undefined variable MY_GROUP.' | |
echo '!!!' | |
echo '!!! ex.) MY_GROUP=staff' | |
echo '!!!' | |
exit 1 | |
fi | |
cd /usr/local | |
git clone git://github.com/sstephenson/rbenv.git rbenv | |
mkdir rbenv/shims rbenv/versions | |
chgrp -R $MY_GROUP rbenv | |
chmod -R g+rwxX rbenv | |
git clone git://github.com/sstephenson/ruby-build.git ruby-build | |
cd ruby-build | |
./install.sh | |
echo 'export RBENV_ROOT="/usr/local/rbenv"' >> /etc/profile.d/rbenv.sh | |
echo 'export PATH="/usr/local/rbenv/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment