Skip to content

Instantly share code, notes, and snippets.

@msykiino
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msykiino/9987256 to your computer and use it in GitHub Desktop.
Save msykiino/9987256 to your computer and use it in GitHub Desktop.
Macにrbenvでrubyをインストールする
#!/bin/bash
#set -x
RUBY_VER=2.1.1
trap 'echo -e "\nabort: signal trapped\n"; exit 1' 1 2 3 15
echo
echo "Starting..."
echo
test ! -f ~/.bash_rbenv && echo -e "\n~/.bash_rbenv not fount... abort\n" && exit 1
. ~/.bash_rbenv
#rbenv install -l
rbenv install $RUBY_VER
rbenv global $RUBY_VER
rbenv rehash
rbenv versions
rbenv version
gem install bundler --no-ri --no-rdoc
gem install pry --no-ri --no-rdoc
rbenv rehash
echo
echo "Finished."
echo
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment