Generate a config file for MongoDB

Rails <= 4.0.0 seems not to have `Rails.application.configure`