August 14th, 2006

Development Environment

Recently Robby convinced me that I should be using DarwinPorts as opposed to the src based configuration that had worked so well for me in the past. So with the help of a few good tutorials I deleted my /usr/local/ directory and made the plunge. After about a week now, having fully played with the new environment, I’ve got to say that if you haven’t tried out DarwinPorts you really should take the time to switch. I know it seems a bit odd that all your files are in this weird /opt directory (at least it was for me), but trust me the dependency management and install/update process is definitely worth the switch.

What follows is a brief recap of my installation process. Nothing here is original, it is all derived from the articles mentioned above, I just wanted to consolidate the information for my own archiving benefit.

Note: The following assumes you are running Mac OSX 10.4 (Tiger)

Install Xcode

Install the Application Image available from the Xcode section of the Apple Developer Connection website (ADC login required).

Install DarwinPorts

Install the Application Image available from the Downloads section of the DarwinPorts website.

Update PATH

echo ‘export PATH=”/opt/local/bin:/opt/local/sbin:$PATH”’ >> ~/.bash_profile

Update DarwinPorts

sudo port selfupdate

Install Ruby & Required RubyGems

sudo port install ruby
sudo port install rb-rubygems
sudo gem install -y rake
sudo gem install -y capistrano

Install RubyCocoa

sudo port install rb-cocoa

Install SQLite

sudo port install swig
sudo port install sqlite3
sudo port install rb-sqlite3

Install MySQL

sudo port install mysql5 +server
sudo port install rb-mysql5
sudo mysql_install_db5 –user=mysql
sudo launchctl load -w /Library/LaunchDaemons/org.darwinports.mysql5.plist

Secure MySQL

cat /etc/my.conf
[mysqld]
skip-thread-priority
skip-networking

Install Subversion

sudo port install subversion +tools

That’s it for now. I’ll update soon with lighttpd, Mongrel, etc. (currently I’m going old-school and running all local dev off of Webrick).

[Update 08/15/2006: Added install of RubyCocoa]