Skip to content

Instantly share code, notes, and snippets.

@zhiyao
Created October 31, 2013 05:44
Show Gist options
  • Save zhiyao/7244804 to your computer and use it in GitHub Desktop.
Save zhiyao/7244804 to your computer and use it in GitHub Desktop.
installing ruby
fancy_echo "Installing Postgres, a good open source relational database ..."
brew install postgres --no-python
initdb /usr/local/var/postgres -E utf8
fancy_echo "Installing Redis, a good key-value database ..."
brew install redis
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..."
brew install the_silver_searcher
fancy_echo "Installing vim from Homebrew to get the latest version ..."
brew install vim
fancy_echo "Installing ctags, to index files for vim tab completion of methods, classes, variables ..."
brew install ctags
fancy_echo "Installing tmux, to save project state and switch between projects ..."
brew install tmux
fancy_echo "Installing reattach-to-user-namespace, for copy-paste and RubyMotion compatibility with tmux ..."
brew install reattach-to-user-namespace
fancy_echo "Installing ImageMagick, to crop and resize images ..."
brew install imagemagick
fancy_echo "Installing QT, used by Capybara Webkit for headless Javascript integration testing ..."
brew install qt
fancy_echo "Installing watch, to execute a program periodically and show the output ..."
brew install watch
### end mac-components/packages
fancy_echo "Installing rbenv, to change Ruby versions ..."
brew install rbenv
if ! grep -qs "rbenv init" ~/.zshrc; then
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
fancy_echo "Enable shims and autocompletion ..."
eval "$(rbenv init -)"
fi
source ~/.zshrc
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
brew install rbenv-gem-rehash
fancy_echo "Installing ruby-build, to install Rubies ..."
brew install ruby-build
### end mac-components/rbenv
fancy_echo "Installing GNU Compiler Collection, a necessary prerequisite to installing Ruby ..."
brew tap homebrew/dupes
brew install apple-gcc42
fancy_echo "Upgrading and linking OpenSSL ..."
brew install openssl
export CC=gcc-4.2
### end mac-components/compiler-and-libraries
fancy_echo "Installing Ruby 2.0.0-p247 ..."
rbenv install 2.0.0-p247
fancy_echo "Setting Ruby 2.0.0-p247 as global default Ruby ..."
rbenv global 2.0.0-p247
rbenv rehash
fancy_echo "Updating to latest Rubygems version ..."
gem update --system
fancy_echo "Installing critical Ruby gems for Rails development ..."
gem install bundler pg rails unicorn --no-document
fancy_echo "Installing GitHub CLI client ..."
curl http://hub.github.com/standalone -sLo ~/.bin/hub
chmod +x ~/.bin/hub
### end common-components/ruby-environment
fancy_echo "Installing Heroku CLI client ..."
brew install heroku-toolbelt
fancy_echo "Installing the heroku-config plugin to pull config variables locally to be used as ENV variables ..."
heroku plugins:install git://github.com/ddollar/heroku-config.git
### end mac-components/heroku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment