Note: You can either install the following from source or build it with something like Darwinports, which has the option of installing everything under /usr/local if you like.
/usr/local/mysql/bin/sudo mv /usr/bin/ruby /usr/bin/ruby16
tar zxvf rubygems-0.8.4.tgz
cd rubygems-0.8.4
ruby setup.rb
sudo gem install mysql rails./configure --with-opensslserver.port = 8080 server.bind = "127.0.0.1" server.event-handler = "freebsd-kqueue" # *important osx/freebsd only option * server.username = "www" server.groupname = "www" server.document-root = "/Users/USER/Sites/rails" server.errorlog = "/Users/USER/Sites/rails/log/server.log" server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_simple_vhost" ) server.indexfiles = ( "dispatch.fcgi", "index.php", "index.html" ) # simple virtual hosting simple-vhost.server-root = "/Users/USER/Sites/rails/" simple-vhost.default-host = "dev.example.com" simple-vhost.document-root = "public" # dev.example.com vhost $HTTP["host"] == "dev.example.com" { server.document-root = "/Users/USER/Sites/rails/dev.example.com/public/" accesslog.filename = "/Users/USER/Sites/rails/log/access.log" # rails stuff fastcgi.server = ( ".fcgi" => ( "localhost" => ( "socket" => "/tmp/dev.example.com.socket", "bin-path" => "/Users/USER/Sites/rails/dev.example.com/public/dispatch.fcgi" ))) } # mimetype mapping mimetype.assign = ( ".pdf" => "application/pdf", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".html" => "text/html", ".txt" => "text/plain", ".css" => "text/css", )
/System/Library/Startup Items/Apache/Apache stop/etc/hosts. For example, to get dev.mynewrailsapp.com working add:127.0.0.1 dev.mynewrailsapp.com