If you’re on Ubuntu, most likely you’re missing a hidden dependency
sudo apt-get install libpq-dev
If you are on OS X, try these steps
- Install Xcode command line tools (Apple Developer site). If you have
it already installed, update it usingbrew update
. brew uninstall postgresql
brew install postgresql
gem install pg