-
-
Save lvnilesh/4992053 to your computer and use it in GitHub Desktop.
rbenv and ruby install
This file contains 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
# The latest version of this script is now available at | |
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
VERSION=1.9.3-p392 | |
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 | |
fi | |
eval "$(rbenv init - --no-rehash)" # load rbenv in the current shell | |
brew tap homebrew/dupes | |
# install apple-gcc, only once needed | |
brew install apple-gcc42 | |
source ~/.zshrc | |
rbenv rehash | |
# this export must be done before every new ruby build | |
export CC=/usr/local/bin/gcc-4.2 | |
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install $VERSION | |
rbenv global $VERSION | |
gem install --no-ri --no-rdoc bundler rbenv-rehash git-up hitch gem-browse gem-ctags cheat awesome_print pry | |
gem ctags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment