Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #13879 from schneems/schneems/more-explicit-databa…

…se-config-error

Enhance errors while retrieving database config
  • Loading branch information...
commit 5d1f0d436cf17dca8dca0a89381577465735319a 2 parents 5977e7e + 7d6592e
@rafaelfranca rafaelfranca authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  railties/lib/rails/application/configuration.rb
View
2  railties/lib/rails/application/configuration.rb
@@ -109,6 +109,8 @@ def database_configuration
raise "YAML syntax error occurred while parsing #{paths["config/database"].first}. " \
"Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
"Error: #{e.message}"
+ rescue => e
+ raise e, "Cannot load `Rails.application.database_configuration`:\n#{e.message}", e.backtrace
end
def log_level
Please sign in to comment.
Something went wrong with that request. Please try again.