This is the easiest, fastest and best-to-develop-in way to get a rails dev stack up and running on OS X 10.6 (Snow Leopard).

I actually find that it’s pretty easy, if everything is done in the right order.

  1. Install XCode
  2. Install Homebrew $ ruby -e "$(curl -fsSL"
  3. Install git using homebrew $ brew install git
  4. Install mysql using homebrew $ brew install mysql
  5. Install rvm (and follow the instructions to set up bash and don’t forget to open a new terminal window) $ bash < <( curl )
  6. Install Ruby Enterprise Edition $ rvm install ree
  7. Make REE the default Ruby $ rvm use ree --default
  8. Tell rubygems to not install rdocs
    Put the following lines in ~/.gemrc install: --no-rdoc --no-ri update: --no-rdoc --no-ri
  9. Install Passenger $ gem install passenger

Now follow that up by running the install script (and follow the directions)

$ ./passenger-install-apache2-module

At the end of the install process it will give you instructions to add 3 lines to the “Apache configuration file”, but it won’t tell you where your apache config file is. It’s at /etc/apache2/httpd.conf
10. Restart Apache
At this point, if you’re using 10.6.5, you might do a sudo /etc/apachectl restart and run into the following error:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argumentTo fix this, edit /usr/sbin/apachectl and change ULIMIT_MAX_FILES to an empty string.Now you can restart apache.
11. Install PassengerPane 1.3

BOOM! Done.

Well, for me, I had to gem install isolate and Rubymine and then I was done, but you get the idea. Just load up the Passenger Preference Pane, point at site at a rails project on your hard drive, and load it up in your browser. Assuming your rails app will boot, you should be good to go!