Wilson Mayers Thanks for the appreciation.
I haven't came across the issue you are mentioning but keep in mind my postgres user is postgres and I am only getting password of db in this tutorial and username is hardcoded.
Also please make sure your database.yml file has:
<% if ENV["DB_HOST"] %>
host: <%= ENV["DB_HOST"] %>
username: postgres
<% end %>
for production db.
Hoping this resolves your issue. If issue still persists, contact me and may be we can come to some solution together.