I've been googling around for tutorials on how to use Ruby on Rails with PostgreSQL. There is some pretty good info out there, but almost every guide is focused on how to configure Rails to use Postgres in development and test environments. They will warn you not to use these configurations for production, but not mention what you should do instead.
On the Postgres side, I would like to know what role I need to give to the Postgres user that Rails will connect to the database with. Also, I assume I would use environment variables in Rails for the DB credentials. Should I use ENV['DATABASE_URL']
in my database.yml? What does this pattern typically look like?
I'm using Rails 4.1.0 with PostgreSQL 9.1.13 on Ubuntu 12.04.2.