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.
- Install XCode
- Install Homebrew
$ ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
- Install git using homebrew
$ brew install git
- Install mysql using homebrew
$ brew install mysql
- Install rvm (and follow the instructions to set up bash and don’t forget to open a new terminal window)
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
- Install Ruby Enterprise Edition
$ rvm install ree
- Make REE the default Ruby
$ rvm use ree --default
- Tell rubygems to not install rdocs
Put the following lines in ~/.gemrc
install: --no-rdoc --no-ri update: --no-rdoc --no-ri
- Install Passenger
$ gem install passenger
Now follow that up by running the install script (and follow the directions)
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
- 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.
- Install PassengerPane 1.3 www.fngtps.com/files/2/2009/09/PassengerPane-1.3.tgz
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!