Skip to content

Instantly share code, notes, and snippets.

@linyows
Last active August 29, 2015 14:25
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 linyows/25dd64a7a93ec3040b91 to your computer and use it in GitHub Desktop.
Save linyows/25dd64a7a93ec3040b91 to your computer and use it in GitHub Desktop.
ruby-init.sh
#!/bin/bash
brew update
brew install readline openssl autoconf pkg-config
git clone git@github.com: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 git@github.com: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
@linyows
Copy link
Author

linyows commented Jul 16, 2015

$ curl -s -L http://git.io/vYOur | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment