Created
July 9, 2016 20:13
-
-
Save dannysmith/e788e545ddfff72c1a7141730f8cdfd7 to your computer and use it in GitHub Desktop.
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
| # Install Ruby | |
| find_latest_ruby() { | |
| rbenv install -l | grep -v - | tail -1 | sed -e 's/^ *//' | |
| } | |
| ruby_version="$(find_latest_ruby)" | |
| fancy_echo "Installing and Configuring rbenv and ruby..." | |
| # append_to_zshrc 'eval "$(rbenv init - --no-rehash)"' 1 | |
| eval "$(rbenv init -)" | |
| # Set Default rubygems to include in all ruby installations via rbenv | |
| fancy_echo "Setting default gems..." | |
| cat > "$HOME/.rbenv/default-gems" <<-EOF | |
| bundler | |
| brice | |
| gist | |
| pry | |
| pry-doc | |
| awesome_print | |
| specific_install | |
| EOF | |
| if ! rbenv versions | grep -Fq "$ruby_version"; then | |
| fancy_echo "Installing ruby $ruby_version..." | |
| RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/opt/openssl rbenv install -s "$ruby_version" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment