Install pg gem on Mac OSX Mavericks with Postgres.app
Posted by: Girish | 21 Nov 2013 | CommentsWhen I was trying to install pg
gem on OSX Mavericks it failed with
following error
gem install pg
.
.
.
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
I am using Postgres.app on my mac. Turns out the installer cannot locate the include headers, and it’s a easy fix.
export CONFIGURE_ARGS="with-pg-include=/Applications/Postgres.app/Contents/MacOS/include"
gem install pg
The gem installs successfully. Hope this helps someone.