Repository: heartcombo/devise

Issue #4542: undefined method `will_save_change_to_email?' for User
Created: 2017-05-18T11:06:18Z
Hi,
I have problems with:

Devise 4.3
Rails 5.1
Mongoid 6.1

NoMethodError (undefined method `will_save_change_to_email?' for #<User:0x007f80b1778ec0>):
  
activesupport (5.1.1) lib/active_support/callbacks.rb:413:in `block in make_lambda'
activesupport (5.1.1) lib/active_support/callbacks.rb:177:in `block (2 levels) in halting_and_conditional'
activesupport (5.1.1) lib/active_support/callbacks.rb:177:in `each'
activesupport (5.1.1) lib/active_support/callbacks.rb:177:in `all?'
activesupport (5.1.1) lib/active_support/callbacks.rb:177:in `block in halting_and_conditional'
activesupport (5.1.1) lib/active_support/callbacks.rb:507:in `block in invoke_before'
activesupport (5.1.1) lib/active_support/callbacks.rb:507:in `each'
activesupport (5.1.1) lib/active_support/callbacks.rb:507:in `invoke_before'
activesupport (5.1.1) lib/active_support/callbacks.rb:130:in `run_callbacks'
mongoid (6.1.0) lib/mongoid/interceptable.rb:138:in `run_callbacks'
activesupport (5.1.1) lib/active_support/callbacks.rb:825:in `_run_validate_callbacks'
activemodel (5.1.1) lib/active_model/validations.rb:405:in `run_validations!'
activemodel (5.1.1) lib/active_model/validations/callbacks.rb:110:in `block in run_validations!'
activesupport (5.1.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
mongoid (6.1.0) lib/mongoid/interceptable.rb:138:in `run_callbacks'
activesupport (5.1.1) lib/active_support/callbacks.rb:825:in `_run_validation_callbacks'
activemodel (5.1.1) lib/active_model/validations/callbacks.rb:110:in `run_validations!'
activemodel (5.1.1) lib/active_model/validations.rb:335:in `valid?'
mongoid (6.1.0) lib/mongoid/validatable.rb:97:in `valid?'
activemodel (5.1.1) lib/active_model/validations.rb:372:in `invalid?'
mongoid (6.1.0) lib/mongoid/persistable/creatable.rb:115:in `prepare_insert'
mongoid (6.1.0) lib/mongoid/persistable/creatable.rb:23:in `insert'
mongoid (6.1.0) lib/mongoid/persistable/savable.rb:23:in `save'
/Volumes/FdData/Users/mToribio/.rvm/gems/ruby-2.4.1/bundler/gems/devise_token_auth-73d82dbd0982/app/controllers/devise_token_auth/registrations_controller.rb:42:in `create'
actionpack (5.1.1) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.1.1) lib/abstract_controller/base.rb:186:in `process_action'
actionpack (5.1.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.1.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.1.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
actionpack (5.1.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.1.1) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.1.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.1.1) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.1) lib/active_support/notifications.rb:166:in `instrument'
actionpack (5.1.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.1.1) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
actionpack (5.1.1) lib/abstract_controller/base.rb:124:in `process'
actionview (5.1.1) lib/action_view/rendering.rb:30:in `process'
actionpack (5.1.1) lib/action_controller/metal.rb:189:in `dispatch'
actionpack (5.1.1) lib/action_controller/metal.rb:253:in `dispatch'
actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:31:in `serve'
actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:16:in `block in <class:Constraints>'
actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:46:in `serve'
actionpack (5.1.1) lib/action_dispatch/journey/router.rb:46:in `block in serve'
actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:832:in `call'
warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
warden (1.2.7) lib/warden/manager.rb:35:in `catch'
warden (1.2.7) lib/warden/manager.rb:35:in `call'
rack (2.0.3) lib/rack/etag.rb:25:in `call'
rack (2.0.3) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.3) lib/rack/head.rb:12:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.1) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.1) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.1) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.1) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.1) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.1) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.1) lib/rails/rack/logger.rb:24:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.1) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
rack-cors (0.4.1) lib/rack/cors.rb:81:in `call'
railties (5.1.1) lib/rails/engine.rb:522:in `call'
puma (3.8.2) lib/puma/configuration.rb:224:in `call'
puma (3.8.2) lib/puma/server.rb:600:in `handle_request'
puma (3.8.2) lib/puma/server.rb:435:in `process_client'
puma (3.8.2) lib/puma/server.rb:299:in `block in run'
puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

In rails 5.0 thats works good.
I have been investigating a little more and I not found where is defined will_save_change_to_email?.
I think thats could be the problem...
For now, I will use Rails 5.0 but I would like use Rails 5.1.
Thanks in advance.

Duplicate issue #4740: NoMethodError: undefined method `will_save_change_to_email?`
Created: 2017-12-28T20:53:02Z
#4531
I've still that error, how to fix that correctly?
ruby 2.4.1 ; Rails 5.1.4 ; Devise 4.3 ; Mongoid 6.1.0
Thank you

Closing comment (2017-12-29T20:17:18Z): Duplicate of #4542