Setting up Rails on a Clean Install of Mac OS X Lion
I realise that OSX does not have a registry to clog up but I have just reinstalled Lion on my Macbook Air; probably a hang up from Windows. This is a checklist for installing Homebrew >> Rails.
- Install XCode 4.1 (There are issues with the 4.2 compiler and certain rubies and gems)
- Install Homebrew
- https://github.com/mxcl/homebrew/wiki/installation
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
- Ensure Homebrew apps are in path before Mac apps
export PATH=/usr/local/bin:$PATH
or edit /etc/paths
- Install Git
brew install git
(thanks Brendan)
- Install SSH keys
- Generate or copy from ~/.ssh from a backup.
- Install RVM
- https://rvm.beginrescueend.com/rvm/install/
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
- Add
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
to bash_profile - Restart shell
- Run
rvm | head -1
- Install latest Ruby and set as default
rvm install 1.9.3
(make sure you are using Xcode 4.1)rvm --default use 1.9.3
- Install Rails
gem install rails
I keep all my .config files in Dropbox and run a bash script to create aliases in my home folder.