jnunemaker/mongomapper — pull request #391 by dgraham (2012-02-15 00:42:09+00:00)
Title: MongoMapper.setup silently fails with symbol as the environment name

The following code from a Sinatra app silently fails to load the right mongo environment.

```ruby
configure do
config = YAML.load_file(File.expand_path('conf/mongo.yml', settings.root))
MongoMapper.setup(config, settings.environment)
end
```

The config Hash loaded by YAML contains String keys for 'test', 'development', and 'production', but Sinatra's settings.environment value is a symbol. This patch converts the environment name to a String before using it as a Hash key.