First, install your preferred version of postgres
sudo port install posgresql84
Now you have psql84 available, which rolls right off your fingers. Even better, your pg_config is buried in a postgresql84 namespace. Fix both of these with:
sudo port select --set postgresql postgresql84
Now you can intall the gem
➔ gem install pg
Building native extensions. This could take a while...
Successfully installed pg-0.13.2
1 gem installed