I have installed postgresql-9.2.4 from the source, now in rails app when I execute:
postgresql-9.2.4
rake db:create command I get:
rake db:create
$ bin/rake db
Make sure you have the correct setup in your database.yml file. You should use template0, as the error suggests:
database.yml
template0
test: adapter: postgresql encoding: unicode database: your_db_name template: template0 host: localhost ...