Go to the postgres documentation:
http://postgresapp.com/documentation/cli-tools.html
cd ~
open .bash_profile
(if you're using zshell, use open .zshrc
instead.)
Add this to the last line of your .bash_profile or .zshrc file:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
rails new postgres_app --database=postgresql
rake db:create