Last active
August 29, 2015 14:25
-
-
Save linyows/25dd64a7a93ec3040b91 to your computer and use it in GitHub Desktop.
ruby-init.sh
This file contains hidden or 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 | |
brew update | |
brew install readline openssl autoconf pkg-config | |
git clone [email protected]:sstephenson/rbenv.git ~/.rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash | |
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems | |
# exclude default-gems file | |
echo default-gems >> ~/.rbenv/.git/info/exclude | |
# create default-gems file | |
cat << EOF > ~/.rbenv/default-gems | |
bundler | |
pry | |
awesome_print | |
EOF | |
git clone [email protected]:rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update | |
# for Japanese and SSL on Mac | |
if [ `uname` = 'Darwin' ]; then | |
export RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" | |
fi | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ curl -s -L http://git.io/vYOur | sh