This guide is for compiling a web development environment in OS X. There are easier and faster methods to set up a development environment — such as Homebrew, MacPorts, Fink — but none provide absolute control. These instructions are for OS X 10.9 Mavericks.
Start with the Getting Started section, then proceed with installing your desired packages. Some packages need to be installed in a certain order to satisfy dependencies. Each package lists its dependencies at the beginning of the instructions.
Source Code Management
PHP served by Apache
Ruby served by Pow
Warning: Remember that these instructions are for creating a development environment and therefore security is not considered. For a production system, please refer to each product's respective documentation on how to properly secure each service.