rails/rails — pull request #8279 by gaurish (2012-11-20 11:04:07+00:00)
Title: Improved Error handling when parsing database.yaml, Fixes #8143

Provides better error message incase the database.yaml has some errors. fixes #8143

error message **before** the change, incase database.yml is invalid:

```ruby
$ rails c
/home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/psych.rb:203:in `parse': (): mapping values are not allowed in this context at line 2 column 10 (Psych::SyntaxError)
```

Error message **AFTER** the change, incase database.yml is invalid:
```ruby
$ rails c
/home/gaurish/code/repo/rails/railties/lib/rails/application/configuration.rb:112:in `rescue in database_configuration': YAML syntax error occurred while parsing /tmp/db/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed Exact Error: (): mapping values are not allowed in this context at line 2 column 10 (RuntimeError)

```

**cc**: @carlosantoniodasilva, @steveklabnik