Ruby Postgresql Gem Cleanup

Vote on HN

I ran into some trouble with getting a good native postgresql driver installed. Here are some links and resources I found to be useful. I also wrote a checklist for bootstrapping a new Rails app with postgres as the adapter.

There are several choices for postgresql adapters. The most active and up-to-date one appears to be ruby-pg, previously known as ruby-postgres. ruby-pr was the one I was using originally, but this one is non-native and unmaintained.

A good starting point was Robby's 'Installing Ruby on Rails and Postgresql on OS X 2nd edition. ShiftEleven also had detailed instructions for installing postgresql with macports.

The exact steps I took that worked for me were:

# start postgres on computer start.
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist

# the ARCHFLAGS is because of Leopard weirdness.
sudo env ARCHFLAGS="-arch i386" gem install pg
comments powered by Disqus