Custom mongoid.yml configuration


#1

We have a ruby on rails environment using Mongoid for ORM.

The default mongoid.yml file that gets put in place turns on logging by default. This creates a lot of noise in our builds that when they fail, we can’t see the error that happens. How can I configure it so that we either 1) turn off logging or 2) have a custom mongoid.yml file be used by the build?


#2

You can create a config/mongoid.yml.ci that you disable logging in and do something like this in your circle.yml.

database:
  pre:
    - cp config/mongoid.yml.ci config/mongoid.yml

#3

Thank you for the reply, we actually had to make the configuration a post: instead of pre: and it worked great!

database:
  post:
    - cp config/mongoid.yml.ci config/mongoid.yml 

Thanks again for the reply.


#4