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