I am working on a rails app. Installed Postgresql using postgresql-9.1.2-1-osx.dmg Installed pg gem. Then when I executed rake db:create getting the
rake db:create
Try brew prune and then reinstall
brew prune