I need to setup option in mongoid.yml. It work in development but production in heroku gave the ignore warning message. Is anyone experience and how to fix this ?
W, [2017-04-05T02:04:09.447207 #4] WARN -- : MONGODB | Unsupported client option 'raise_not_found_error'. It will be ignored.
W, [2017-04-05T02:04:09.449089 #4] WARN -- : MONGODB | Unsupported client option 'belongs_to_required_by_default'. It will be ignored.
W, [2017-04-05T02:04:09.449176 #4] WARN -- : MONGODB | Unsupported client option 'consistency'. It will be ignored.
In mongoid.yml
production:
clients:
default:
uri: <%= ENV['MONGODB_URI'] %>
options:
raise_not_found_error: false
belongs_to_required_by_default: false
consistency: :strong
It is the error Mongo db gives when it tries to find any record and it doesn't match in database. In order to resolve this
Add this line in your production configuration
raise_not_found_error: false