I\'m curious how to correctly set up my database.yml
file in a Rails 4 application.
It\'s not something I have really looked into in great detail as it all
The second database.yml you posted is actually equivalent to the first, it just copies values from the development block.
To answer your other questions:
1) Should I be setting usernames and passwords in ALL environments
you can if you wish, or you can leave it as you have above where it takes the credentials all from one block.
2)If I'm using clear DB with Heroku as my database then should I be uncommenting
heroku actually completely disregards this file (which shouldn't be checked into source control in the first place anyway). Heroku has its own mechanism to handle databases which you can read more about here: https://devcenter.heroku.com/articles/heroku-postgresql
Essentially, treat "heroku's databases" and local databases that you define in this file completely different.