pg is the activerecord-postgresql-adapter gem, so that is what it is failing to find.
Since it is only failing from migrate, it might be rake is starting from a different version of ruby than console or script - do you have multiple versions of ruby?
Also since it is failing in rake, I would get the verbose (-v) output so you can see the stack trace, and see better what is going on, and at what point it tries to get pg but does not have the gem available. I have seen some weirdness with rake loading in a different order from rails start up, so that is not impossible.
There is a recent plugin that professes to help with pg migrations in rails, might help:
http://github.com/alex3t/rails_on_pg
In case my guess above is completely unhelpful, here are some other places to look:
Project page for pg:
https://rubyforge.org/projects/ruby-pg/
For more postgres on rails support:
http://wiki.rubyonrails.org/database-support/postgres
Robby Russell write more about postgres than any other rails blogger I read:
http://www.robbyonrails.com/articles/tag/postgresql