Skip to content

Instantly share code, notes, and snippets.

@0xjjpa
Forked from svnlto/install.md
Created October 21, 2012 01:33
Show Gist options
  • Save 0xjjpa/3925400 to your computer and use it in GitHub Desktop.
Save 0xjjpa/3925400 to your computer and use it in GitHub Desktop.
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

Latest update 20-Oct-2012. [email protected]

Command Line Tools are required for Homebrew. Previously it was suggested to download Xcode 4, but since the new version doesn't ship the proper gcc compiler for rvm, the command line tools are a better option and then using homebrew to get the gcc compiler. If preferred, install Xcode 4, although this setup doesn't follow that set of instructions.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

Note that Xcode is a pre-req for Homebrew

Set shell to ZSH and install oh-my-zsh

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

restart iTerm2

SCM

Git

brew install git

http://help.github.com/mac-set-up-git/

Mercurial

brew install mercurial

Copy over your SSH Keys from your existing machine if you have them and want to carry over your existing SSH configs.

\curl -L https://get.rvm.io | bash -s stable --ruby=rbx --gems=rails,puma

First make sure you run rvm requirements afterwards, and if required rvm reinstall all --force. Also note this command installs rails and puma. If you want plain Ruby use:

\curl -L https://get.rvm.io | bash -s stable --ruby

Some of instructions to pay attention to from rvm requirements:

Install of apple-gcc42

brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl

Install Libksba for Ruby 1.9.3

brew install libksba

To use an RVM installed as default, instead of the system ruby:

rvm install 1.9.3 # installs patch 286: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.9.3 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.9.3  # don't forget to restart your terminal

.zshrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Start new shell session

Install ruby

rvm install 1.9.2
rvm install 1.8.7
rvm notes

See if there is anything in the rvm notes you need to take action on. As of this writing the compiler needs to be overridden.

Create a ~/.gemrc file and add the line

gem: --no-ri --no-rdoc

 rvm --default 1.8.7
 rvmsudo gem install bundler
 rvmsudo gem install lunchy

Node.js

nvm

From home (zsh may try to convert nvm to .nvm. Go nay): git clone git://github.com/creationix/nvm.git ~/.nvm

.zshrc

[[ -s "$HOME/.nvm" ]] && . "$HOME/.nvm/nvm.sh"

node.js

nvm install v0.8.12
nvm alias default 0.8

Unlike RVM that adds the binary version of the node to .zshrc, you need to do it manually according to the version you are using. So for instance:

PATH=$PATH:$HOME/.nvm/v0.8.12/bin # Add NVM to PATH for scripting

npm (Latest version of Node already have npm included)

curl http://npmjs.org/install.sh | sh

Vagrant

gem install vagrant
$ vagrant box add base http://files.vagrantup.com/lucid64.box
$ vagrant init
$ vagrant up

ievms

https://github.com/xdissent/ievms

Download and unpack ievms:

Install IE versions 6, 7, 8 and 9.

curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash

Install specific IE versions (IE7 and IE9 only for example):

curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7 9" bash

Launch Virtual Box.

Choose ievms image from Virtual Box. Install VirtualBox Guest Additions (pre-mounted as CD image in the VM). IE6 only - Install network adapter drivers by opening the drivers CD image in the VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment