I'm having trouble installing the pg gem on my laptop running Linux Mint 13.
Here's what I get: http://pastebin.com/WZakAtaA
Here's the contents of the mkmf.log file: http://pastebin.com/VwiLS4VH
The most common recommendation seems to be to install libpq-dev, which I've done to no effect.
I'm happy to provide any extra info needed to track down this issue.