Heroku: Why isn't the config/database.yml file relevant?

As you know, Heroku uses the PostgreSQL database by default.

However, when you deploy an app that you created with the use of SQLite
in
the development environment, the config/database.yml file on the Heroku
server is still configured for SQLite.

Exactly how does Heroku make the config/database.yml file relevant? How
does the app get the database name, username, and password in the Heroku
environment?

On Friday, February 20, 2015 at 11:50:50 PM UTC, Jason H., Rubyist
wrote:

As you know, Heroku uses the PostgreSQL database by default.

However, when you deploy an app that you created with the use of SQLite in the
development environment, the config/database.yml file on the Heroku server is
still configured for SQLite.

Exactly how does Heroku make the config/database.yml file relevant? How does
the app get the database name, username, and password in the Heroku environment?

On older rails versions heroku entirely rewrites the database.yml file.
On rails 4.2 it doesn’t need to because rails will use a DATABASE_URL
environment variable if it is set. See

for more details

Fred

I think you need to changed your production configuration …in your yml
files…

production:
<<: *default
database: name_production
username: name
password: <℅= ENV[‘NAME_DATABASE_PASSWORD’]℅>

the ENV tag automatic generated a unique password for your rail
application on heroku production… I am not confirm. Because I am also
a new developer.