mongodb/mongoid · error
Unknown config options detected: #{config}.
Error message
Unknown config options detected: #{config}. What it means
Error "Unknown config options detected: #{config}." thrown in mongodb/mongoid.
Source
Thrown at lib/mongoid/clients/factory.rb:68
#
# @example Create the client.
# Factory.create_client(config)
#
# @param [ Hash ] configuration The client config.
#
# @return [ Mongo::Client ] The client.
def create_client(configuration)
raise Errors::NoClientsConfig.new unless configuration
config = configuration.dup
uri = config.delete(:uri)
database = config.delete(:database) || Mongo::URI.get(uri).database
hosts = config.delete(:hosts)
opts = config.delete(:options) || {}
if opts.key?(:auto_encryption_options)
opts[:auto_encryption_options] = build_auto_encryption_options(opts, database)
end
default_logger.warn("Unknown config options detected: #{config}.") unless config.empty?
if uri
Mongo::Client.new(uri, options(opts))
else
Mongo::Client.new(
hosts,
options(opts).merge(database: database)
)
end
end
# Build auto encryption options for the client based on the options
# provided in the Mongoid client configuration and the encryption
# schema map for the database.
#
# @param [ Hash ] opts Options from the Mongoid client configuration.
# @param [ String ] database Database name to use for encryption schema map.
#
# @return [ Hash | nil ] Auto encryption options for the client.View on GitHub (pinned to 0da0e23d71)
When it happens
Trigger: Thrown at lib/mongoid/clients/factory.rb:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mongodb/mongoid@0da0e23d71 (2026-08-23).
Data as JSON: /api/errors/76b13bb5944d3240.
Report an issue: GitHub.