rubymongomapper

Ruby and mongo_mapper error


I have a problem running any Ruby application with mongo_mapper.

include MongoMapper::Document in my simple class rises an error: ...2.3.1/lib/ruby/gems/2.3.0/gems/mongo_mapper-0.14.0/lib/mongo_mapper/plugins/active_model.rb:9:in <module:ActiveModel>': uninitialized constant ActiveModel::Serializers::Xml (NameError)

I have gems for ActiveModel::Serializers and ActiveModel::Serializers::Xml installed.


Solution

  • I cannot explain but using the bundler to run the application solves the problem.