Use ENV['MONGODB_URI'] if available #99

merged 1 commit into from Jun 2, 2012

3 participants



There's a growing trend to use _URL-style environment variables in database drivers:

Note that I followed the convention already established in the MongoDB code of calling it a "URI" and not a "URL", so that is one difference from the general trend.

Fundamentally, this change will make MongoDB a lot easier to deploy on services like Heroku that encourage environment variables.


PS. rake test:ruby and rake test:c all pass - plus I added more tests.


@banker yah, no reason to touch that in this pull request - i'll do more research and submit it separately


@banker how do you feel about the rest?


hi @banker I removed the offending commit and force-pushed to my branch, so it's cleaner now.


Thanks, @seamusabshere. We'll look into merging this in soon.


hi @banker - hope this is still in the queue!


hey @TylerBrock - saw you merging some pull requests - still willing to make any changes you guys want on this.


@seamusabshere Yeah, as a Heroku fan, I like this. Hold tight, I just need to review it carefully. Thank you for your patience on this one.


Ok, this looks great. Thank you for all the hard work.

@TylerBrock TylerBrock merged commit 2cfacbd into mongodb:master Jun 2, 2012

Tests didn't pass in 1.8.7, might have to revert this one until I have more time.


fix using CGI.parse instead of URI.decode_www_form on its way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment