Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created February 3, 2012 02:52
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kyanny/1727338 to your computer and use it in GitHub Desktop.
Save kyanny/1727338 to your computer and use it in GitHub Desktop.
system-wide installation rbenv + ruby-build @/usr/local
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