Skip to content

Instantly share code, notes, and snippets.

@jasoncodes
jasoncodes / gist:1223731
Created September 17, 2011 07:45
Installing Ruby 1.9.3 with rbenv on OS X
# The latest version of this script is now available at
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh
VERSION=1.9.3-p286
brew update
brew install rbenv ruby-build rbenv-vars readline ctags
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
@havenwood
havenwood / brew-ruby-chruby.sh
Last active December 8, 2021 02:47
Install the latest Homebrew precompiled Ruby with the chruby Ruby version switcher.
# Install Homebrew if you haven't already:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install the latest stable Ruby and chruby:
brew install ruby chruby
# Symlink brew Ruby to ~/.rubies where chruby will autodetect it:
mkdir -p "$HOME/.rubies"
ln -s "$(brew --prefix ruby)" "$HOME/.rubies/ruby-$(brew ls --versions ruby | cut -d" " -f2)"