checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
An error occured while installing pg (0.13.2), and Bundler cannot continue.
Installing libpq-dev should solve the problem.
sudo apt-get install libpq-dev