When you generate a new rails app with postgres as db it automatically set username to appname in database.yml.
You then have to manually change it to your username or the app will not run.
Is there any way to automatically set it to logged in user (at time of running rails new) or other preset username?
In development and test environments it will always be the same username and production does not matter as it always deployed on heroku.
I am on ubuntu, but would be great to hear solutions for mac users also.
rails newso often that this matters?rake db:createto already have run as they create migrations. It wont create the db's if the username is incorrect thus losing the usefulness of the template (works great with sqlite)run "cp config/database.yml config/database.example"