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
/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:$PATHor edit /etc/paths
- Install Git
brew install git(thanks Brendan)
- Install SSH keys
- Generate or copy from ~/.ssh from a backup.
- Install RVM
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.to bash_profile
- Restart shell
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.
4 thoughts on “Setting up Rails on a Clean Install of Mac OS X Lion”
Nice write-up. Had problems with step 4 – resolved by using “brew install git” instead of “brew git install”. Thanks!
Oops. Thanks and fixed.
Seems that correct line is
rvm use 1.9.3 –-default
Thanks for your article
Arghhh. Thanks for spotting that. There are actually 2 hyphens there but it is being rendered as a single hyphen, however it prompted me to check https://rvm.beginrescueend.com/rubies/default/ and it seems rvm –default use 1.9.3 is the way to go. I’ll change it and enclose it in a code element or gist.