Dean

Setting up a Ruby on Rails development environment on Mountain Lion

Having just installed Mountain Lion on my MBA, I encounted a few small problems while trying to install RVM as well as Ruby, etc. Below are the steps I took to get Ruby on Rails up and running on my new Mountain Lion install.

Step 1. Install XCode (this isn’t required but it’s best to install it)

Step 2. Install the XCode Command Line Tools from developer.apple.com. Note you need to download the 10.8 command line tools which is at the bottom of the list on XCode 4.4. I made the mistake of downloading the 10.7 Lion set first!

Step 3. Install XQuartz

Step 4. Install HomeBrew ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

Step 5. Check that HomeBrew works OK brew doctor

Step 6. Install GCC 4.2 because Mountain Lion doesn’t come with it by default.

brew tap homebrew/dupes
brew install apple-gcc42
sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2

Step 7. Install RVM

Step 8. Install Ruby! rvm install 1.9.3 for the latest version of Ruby 1.9.3

Step 9. Set 1.9.3 as the default ruby - rvm use 1.9.3 --default

Step 10. Install the base gems - gem install rails bundler

Step 11. Install Pow which is a brilliant Ruby development server. No need to keep running rails server all the time. curl get.pow.cx | sh

Step 12. Install Git brew install git

Step 13. (optional). Install MySQL using homebrew brew install mysql. It looks like Java is required as well during installation for some reason.

Copyright 2011-2021 Dean (deanpcmad)

Buy me a Coffee