Skip to content

Instantly share code, notes, and snippets.

@jjb
Created April 10, 2012 01:30
Show Gist options
  • Save jjb/2347804 to your computer and use it in GitHub Desktop.
Save jjb/2347804 to your computer and use it in GitHub Desktop.
How to build the pg gem on os x with macports

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment