Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4117

Suggested fix for errors in mongoid.yml mention Rails

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Resolution talks about Rails, not everybody uses Rails.

      Double check your mongoid.yml to make sure that you have a top-level clients key with at least 1 default client configuration for it. You can regenerate a new mongoid.yml for assistance via rails g mongoid:config.

      /Users/dblock/.rvm/gems/ruby-2.1.2/gems/mongoid-5.0.0.beta/lib/mongoid/config.rb:252:in `clients=':  (Mongoid::Errors::NoClientsConfig)
      Problem:
        No clients configuration provided.
      Summary:
        Mongoid's configuration requires that you provide details about each client that can be connected to, and requires in the clients config at least 1 default client to exist.
      Resolution:
        Double check your mongoid.yml to make sure that you have a top-level clients key with at least 1 default client configuration for it. You can regenerate a new mongoid.yml for assistance via `rails g mongoid:config`.
       
       Example:
         development:
           clients:
             default:
               database: mongoid_dev
               hosts:
                 - localhost:27017
       
      	from /Users/dblock/.rvm/gems/ruby-2.1.2/gems/mongoid-5.0.0.beta/lib/mongoid/config.rb:131:in `load_configuration'
      	from /Users/dblock/.rvm/gems/ruby-2.1.2/gems/mongoid-5.0.0.beta/lib/mongoid/config.rb:88:in `load!'
      	from /Users/dblock/.rvm/gems/ruby-2.1.2/gems/mongoid-5.0.0.beta/lib/mongoid.rb:106:in `load!'
      
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: