我已经将mongoid gem从mongoid-4 on rails 4应用程序更新为5。我在重启应用时面临以下警告
W, [2017-02-15T13:59:49.356541 #14483] WARN -- : MONGODB Unsupported client option 'max_retries'. It will be ignored.
W, [2017-02-15T13:59:49.356739 #14483] WARN -- : MONGODB
Unsupported client option 'retry_interval'. It will be ignored.
W, [2017-02-15T13:59:49.356877 #14483] WARN -- : MONGODB Unsupported client option 'username'. It will be ignored.如何更新Mongoid Yml以删除警告?
这也是当前的YML文件
staging:
clients:
default:
database: chillr_api
hosts:
- localhost:27017
options:
read:
mode: :nearest
# In the test environment we lower the retries and retry interval to
# low amounts for fast failures.
max_retries: 1
retry_interval: 0
username: 'username'
password: 'username'发布于 2017-02-15 16:53:37
Okey.Seems max_retries和retry_interval是便携配置。由于在mogoid5中删除了Moped,因此可以从configuration .Yml示例中删除它
https://stackoverflow.com/questions/42244407
复制相似问题