Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Mongo config read as strings instead of symbols #23

Closed
jrobhsi opened this issue Sep 5, 2012 · 2 comments
Closed

Mongo config read as strings instead of symbols #23

jrobhsi opened this issue Sep 5, 2012 · 2 comments

Comments

@jrobhsi
Copy link
Contributor

jrobhsi commented Sep 5, 2012

Not sure if I'm doing something wrong or just different than everyone else; my mongo config yaml is being read as a hash of strings, so the (for example) database_name does not get set when calling:

@database_name = config.delete(:database) || default_db_name

I'm looking at nunemaker's approach to reading config in his call to connect (line 68) as a possible solution.

In addition, I'm wondering if it makes sense to provide a default host and port (localhost, and ... whatever the default port is for mongo)? I'll see if I can't put a pull request together, unless someone fires back with what I may be doing wrong in my yaml file. 😃 I figure since this bug doesn't exist, I must be missing something obvious in my yaml...

development: &dev
  database: POC_dev
@stephenchu
Copy link

For symbol keys in yaml, you can try :database: instead.

@jrobhsi
Copy link
Contributor Author

jrobhsi commented Sep 6, 2012

Good to know! I submitted a pull request just to add the call to symbolize_keys nonetheless.

@pgr0ss pgr0ss closed this as completed in cf79dd9 Sep 7, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants