Check for database connection when running current_application_settings
The PG connection errors don't always end up being caught as ActiveRecord::NoDatabaseError. So when doing a precompile without the database (like when using the omnibus), an exception was being thrown.
See merge request !292