Sandboxing Rails
Published by Robert Bousquet on 2008-05-30 16:13:00 UTC
James Duncan Davidson wrote up a great recipe for installing Rails that I have been pointing people to for a couple years. For some reason it’s now missing from his site so here’s my version of it from memory:
1. Install Apple Developer Tools, available on your OSX DVD or as a free download from http://developer.apple.com
2. Install the Macports package manager for OSX. It will manage the installation of all the libraries we need.
3. Hide the /opt directory from displaying in the OSX Finder gui
4. Install MySQL server via MacPorts.
Configure mysql5 to start automatically at boot by running the following two commands:
5. Install Subversion.
6. Install Ruby and related libraries. Note: This is my recipe for the best Ruby 1.8.6 based Rails installation instead of the default Ruby 1.8.7. If you just want the latest version of Ruby, then just skip to 6b.
Edit /opt/local/etc/macports/sources.conf and insert the file:///... line before the default port repository line. The last two lines of the file should say:
Run:
7. Follow this series of commands to get Ruby and Rails installed.
8. Optional installs I recommend
That should give you a firm foundation to start your Rails applications. This recipe has satisfied the needs of 90% of my applications.

