ruby - NameError: uninitialized constant ActiveModel::Serializers::Xml when declaring a mongomapper document model -


this first time use ruby mongodb orm , , when follow tutorial on website try make document model :

ruby require 'mongo_mapper'    include mongomapper::document    key :title,        string   key :content,      string   key :published_at, time   timestamps! end 

my command line issue error nameerror: uninitialized constant activemodel::serializers::xml

from /users/robertrino/.rvm/gems/ruby-2.2.3/gems/mongo_mapper-0.14.0/lib/mongo_mapper/plugins/active_model.rb:9:in'`

and app crashed.

i searched solution seems no 1 have encountered problem, tell me how solve error ?

by way try command above in pry gem.

require 'mongo_mapper' >>true mongomapper.constants >>[:error,  :documentnotfound,  :invalidscheme,  :documentnotvalid,  :accessibleorprotected,  :invalidkey,  :notsupported,  :document,  ...]  mongomapper::document >> nameerror ... (the same error) 

has been moved external gem, please try add gemfile:

gem 'activemodel-serializers-xml' gem 'active_model_serializers' 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -