I am using the Ruby on Rails 3.1 pre version. I like to use PostgreSQL, but the problem is installing the pg
gem. It gives me the following error:
On macOS (previously Mac OS X and OS X), use Homebrew to install the proper headers:
brew install postgresql
and then running
gem install pg
should work.
Alternatively, instead of installing the whole postgresql
, you can brew install libpq
and export the correct PATH
and PKG_CONFIG_PATH
as explained in the 'Caveats' section