Unable to install pg gem file on CENT OS

Install postgresql-libs and also recompile your Ruby after install libyaml.

You will need to install libyaml-devel from the epel repositories (which you will also need to add).