I have installed postgresql-9.2.4 from the source, now in rails app when I execute:
rake db:create command I get:
$ bin/rake db
If your postgres installation is new and you haven't populated any databases yet, then you can remove your data directory and re-run the initdb command with the flag to create databases using UTF-8.
Modify this command to match your postgres installation. The -E flag tells what character encoding should be the default. Other character encodings are listed here.
/usr/local/pgsql/bin/initdb -E UTF8 -D /usr/local/pgsql/data -U postgres
It should error and tell you that the data directory is not empty. Follow the instructions and remove the directory, then re-run the command. (Or, remove the data directory before you start, but it's always nice to see the instructions for yourself.)