unable to install pg gem
I had this problem, this worked for me:
Install the postgresql-devel package, this will solve the issue of pg_config missing.
sudo apt-get install libpq-dev
Issue is gem dependency so before installing pg make sure you have installed "libpq-dev"
Ubuntu systems:
sudo apt-get install libpq-dev
RHEL systems:
yum install postgresql-devel
Mac:
brew install postgresql
gem install pg -- --with-pg-config=/usr/pgsql-9.1/bin/pg_config