First, we have to install Homebrew. Once it's installed, we can do pretty much everything else via Homebrew. By default Homebrew will install to /usr/local. It's possible to choose a different directory but everything I've read so far says it's a PITA. I'm sticking with the default.
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"
Getting your development environment running requires a few servers. You could get by with as little as Postgres and Memcached but it'll be better if you have Nginx and RabbitMQ as well. Eventually you'll probably want Redis and Artie as well.
TODO: instructions for Redis and Artie
brew install postgresql
initdb /usr/local/var/postgres
cp /usr/local/Cellar/postgresql/8.4.4/org.postgresql.postgres.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
brew install memcached
cp /usr/local/Cellar/memcached/1.4.5/com.danga.memcached.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/com.danga.memcached.plist
Running tests requires a second instance of Memcached.
cp ~/Library/LaunchAgents/com.danga.memcached.plist \
~/Library/LaunchAgents/com.danga.memcached_11212.plist
Edit ~/Library/LaunchAgents/com.danga.memcached_11212.plist changing:
<string>com.danga.memcached_11212</string>
and
<array>
<string>/usr/local/bin/memcached</string>
<string>-U</string>
<string>0</string>
<string>-p</string>
<string>11212</string>
<string>-m</string>
<string>16</string>
<string>-l</string>
<string>127.0.0.1</string>
</array>
then run
launchctl load -w ~/Library/LaunchAgents/com.danga.memcached_11212.plist
% brew install nginx
Replace /usr/local/etc/nginx/nginx.conf with the sample below. Be sure to change PATH_TO_YOUR_WORKFEED_GIT_REPOSITORY.
Create /Library/LaunchAgents/org.nginx.server.plist using ...
sudo launchctl load -w /Library/LaunchAgents/org.nginx.server.plist
brew install git
brew install ruby-enterprise-edition
Make sure your PATH is set up to prefer HomeBrew's gem otherwise things will go very badly for you. Do not use Apple's Ruby: Goats + Dicks + Sylphis.
gem install taf2-curb --source=http://gems.github.com --no-rdoc --no-ri
gem install rack --version="1.0.1" --no-rdoc --no-ri
gem install json --version="1.2.1" --no-rdoc --no-ri
gem install \
sinatra \
v8 \
hpricot \
nokogiri \
longurl \
tweetstream \
memcached \
yajl-ruby \
tzinfo \
feedzirra \
system_timer\
--no-rdoc --no-ri
This is a handy way to get your shell prompt to display git info.
brew install python
brew install pip
pip install mercurial
brew install vcprompt
Then stick "$(vcprompt)" somewhere in your shell prompt.