Just a quick pointer; hopefully it saves someone a few minutes of searching. If you want to install the Ruby native code driver for Postgres (as opposed to the pure Ruby driver, postgres-pr) and your PostgreSQL installation is in some non-standard location, just do this:
Incidentally, that driver appears to have been originally written by the man himself:
And thanks to Noboru Saitou for maintaining it!