Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created February 3, 2012 02:52
Show Gist options
  • 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