Laptop is an idempotent script to set up a Mac OS X laptop for Rails development.
Install a C compiler:
For Lion (10.7) or Mountain Lion (10.8): use Command Line Tools for XCode.
For Mavericks (10.9): run sudo xcodebuild -license
and follow the instructions
to accept the XCode agreement. Then run xcode-select --install
in your
terminal and then click "Install".
For Sierra (10.12): run sudo xcodebuild -license
.
Read, then run the script:
bash <(curl -s https://raw.githubusercontent.com/attack/laptop/master/mac)
- chruby for managing versions of the Ruby programming language
- Ruby Build for installing Rubies
- Ruby stable for writing general-purpose code
- Bundler gem for managing Ruby libraries
- Homebrew + Cask for managing operating system libraries
- Hub gem for interacting with the GitHub API
- Heroku Config plugin for local
ENV
variables - Heroku Toolbelt for interacting with the Heroku API
- Exuberant Ctags for indexing files for vim tab completion
- Postgres for storing relational data
- Redis for storing key-value data
- The Silver Searcher for finding things in files
- Tmux for saving project state and switching between projects
- Qt for headless JavaScript testing via Capybara Webkit
- Tig for an improved git log
- Alfred for application launching
- Caffeine for managing mac sleep
- Google Chrome
- Google Drive
- Textmate
- Gitx for a git GUI
- ItsyCal for a menu bar time + calendar
- Flux
- iTerm2
- vim + MacVim
- ShiftIt for window management
- solarized colour theme for terminal + iTerm
- dotfiles
It should take less than 15 minutes to install (depends on your machine).
Put your customizations in ~/.laptop.local
. For example, your
~/.laptop.local
might look like this:
brew bundle --file=- <<EOF
cask "spotify"
cask "viscosity"
EOF
start_if_needed Viscosity
rubies=( '1.9.3' '2.0.0' )
for local_ruby_version in ${rubies[@]}; do
fancy_echo "Installing Ruby ${local_ruby_version} ..."
ruby-install --no-reinstall "ruby-${local_ruby_version}"
chruby-exec $local_ruby_version gem update --system
chruby-exec $local_ruby_version gem install bundler --no-document --pre
done
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
less_fancy_echo "Restarting affected apps ..."
for app in "cfprefsd" "SystemUIServer"; do
killall "${app}" > /dev/null 2>&1
done
Laptop is © 2011-2014 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.