diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index f97e66985c..89afeaeec5 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -105,6 +105,10 @@ module Rails def database_configuration require 'erb' YAML.load ERB.new(IO.read(paths["config/database"].first)).result + rescue Psych::SyntaxError => e + 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}" end def log_level