................................................................
But when I try to create same databases using the command
'rake db:create:all', I am getting an error massage saying 'FATAL:
Ident authentication failed for user "postgres"'. And none of the
databases are created.
And also after creating databases as shown above, I created migration
files and I am able to do rake db:migrate for the same database.yml
file.
Can you please help me why 'rake db:create:all' is not working?
Thank you
Ajit
--
Posted via http://www.ruby-forum.com/.
Possibly you have the correct user/password for the development db but
not for one of the others. Try using create to create them one at a
time and see if one fails. Also check the yml file very carefully for
small errors. Possibly copy/paste the user/password lines from the
development section to the others.
Colin
----
not a rails issue but an issue from not understanding postgresql.
probably a bad idea to use 'postgres' as the user/owner of a database and postgres has users/roles/grants functionality for the purpose of program interface with the postgres server.
if you are intent on using postgres without gaining any knowledge about it's authentication mechanisms, then you should understand that user postgres doesn't have a password and out of the box, can only use the localhost postgresql server via a local socket (not TCP/IP) - thus database.yml shouldn't have a password, a port # or anything but the actual local socket (/var/run/postgresql/$SOME_PID_FILE ?)
Craig