Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update config/database.yml to use DATABASE_URL in production
The previous configuration would result in the following type of error on Heroku. app[web.1]: /.../connection_adapters/postgresql_adapter.rb:888:in `initialize': could not connect to server: No such file or directory (PG::ConnectionBad) app[web.1]: Is the server running locally and accepting app[web.1]: connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? From <https://github.com/rails/rails/blob/4-1-stable/activerecord/CHANGELOG.md#rails-410-april-8-2014>: > Currently Active Record can be configured via the environment variable > `DATABASE_URL` or by manually injecting a hash of values which is what Rails > does, reading in `database.yml` and setting Active Record appropriately. > Active Record expects to be able to use `DATABASE_URL` without the use of > Rails, and we cannot rip out this functionality without deprecating. The `DATABASE_URL` environment variable should contain all the settings now removed from `config/database.yml`.
- Loading branch information
Showing
2 changed files
with
10 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters