Agile web devlopment in Rails [1st ed] is a great book - really. But when it comes to installing Rails on postgres - lets just say that it wasn't really written with ubuntu in mind. This page has far better installation steps (including setting up your pg_hba.conf for dapper).
The new edition is available now and I've just ordered myself a copy... this one looks great too - but is still based around MySQL. They do point at the RailsOnUbuntu page for installation, though - which is good. Definitely follow the "recommended way"!