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:
I had the same issue on Amazon Linux. I could find the header libpq-fe.h
, but somehow it didn't work.
It came from the different versions of the packages that were installed through the different users on the machine. PostgreSQL 9.2 and PostgreSQL 9.3 were installed. So, make sure of your PostgreSQL version before including the libraries.
For me, the magic command line was:
sudo yum install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel
Source: An almost idiot's guide to install PostgreSQL 9.3, PostGIS 2.1 and pgRouting with Yum