mercredi 19 janvier 2022

Getting uninitialized constant Moped even though moped has been totally removed (upgrading old App)

Upgrading a very old Application from Rails 3.22 to 4.2.11.3. (I know it is old and terribly outdated).

I cannot figure out this error I am getting.

uninitialized constant Moped

I understand the uninitialized constant error itself. However, There is no reference to Moped in the application or any included Gem. The app does us MongoDB, however Rails 4 moves to the Mongo Ruby driver which I am aware of, and have previously made the change over in another upgrade that had the same Rails versions.

I have opened every Gem we include and searched the directory for Moped, Moped:: and moped and there is nothing.

I followed the stacktrace but was unable to find any strings to pull on.

activesupport (4.2.11.3) lib/active_support/inflector/methods.rb:261:in `const_get'
activesupport (4.2.11.3) lib/active_support/inflector/methods.rb:261:in `block in constantize'
activesupport (4.2.11.3) lib/active_support/inflector/methods.rb:259:in `each'
activesupport (4.2.11.3) lib/active_support/inflector/methods.rb:259:in `inject'
activesupport (4.2.11.3) lib/active_support/inflector/methods.rb:259:in `constantize'
activesupport (4.2.11.3) lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
activesupport (4.2.11.3) lib/active_support/core_ext/marshal.rb:10:in `rescue in load_with_autoloading'
activesupport (4.2.11.3) lib/active_support/core_ext/marshal.rb:5:in `load_with_autoloading'
actionpack (4.2.11.3) lib/action_dispatch/middleware/cookies.rb:424:in `deserialize'
actionpack (4.2.11.3) lib/action_dispatch/middleware/cookies.rb:459:in `[]'
devise (4.8.1) lib/devise/strategies/rememberable.rb:60:in `remember_cookie'
devise (4.8.1) lib/devise/strategies/rememberable.rb:15:in `valid?'
warden (1.2.7) lib/warden/proxy.rb:356:in `block in _run_strategies_for'
warden (1.2.7) lib/warden/proxy.rb:354:in `each'
warden (1.2.7) lib/warden/proxy.rb:354:in `_run_strategies_for'
warden (1.2.7) lib/warden/proxy.rb:324:in `_perform_authentication'
warden (1.2.7) lib/warden/proxy.rb:105:in `authenticate'
devise (4.8.1) lib/devise/controllers/helpers.rb:126:in `current_user'
devise (4.8.1) lib/devise/controllers/helpers.rb:122:in `user_signed_in?'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:432:in `block in make_lambda'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:144:in `block (2 levels) in halting_and_conditional'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:144:in `each'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:144:in `all?'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:144:in `block in halting_and_conditional'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:504:in `block in call'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:504:in `each'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:504:in `call'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.11.3) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.11.3) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.11.3) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.11.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.11.3) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.11.3) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
actionpack (4.2.11.3) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.11.3) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.11.3) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.11.3) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.11.3) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.11.3) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.11.3) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.11.3) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (4.2.11.3) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.11.3) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.11.3) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.11.3) lib/action_dispatch/routing/route_set.rb:817:in `call'
omniauth (1.4.3) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.4.3) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.4.3) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.4.3) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.4.3) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.4.3) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.4.3) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.4.3) lib/omniauth/strategy.rb:164: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 (1.6.13) lib/rack/etag.rb:24:in `call'
rack (1.6.13) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.13) lib/rack/head.rb:13:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.13) lib/rack/session/abstract/id.rb:252:in `context'
rack (1.6.13) lib/rack/session/abstract/id.rb:247:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/cookies.rb:560:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.11.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.11.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
bugsnag (6.24.1) lib/bugsnag/integrations/rack.rb:51:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.11.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.11.3) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.11.3) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.11.3) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.11.3) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.11.3) lib/rails/rack/logger.rb:20:in `call'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:151:in `block in call'
rack-timeout (0.6.0) lib/rack/timeout/support/timeout.rb:19:in `timeout'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:150:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.13) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.13) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.11.3) 
lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.13) lib/rack/lock.rb:17:in `call'
actionpack (4.2.11.3) lib/action_dispatch/middleware/static.rb:120:in `call'
rack (1.6.13) lib/rack/sendfile.rb:113:in `call'
railties (4.2.11.3) lib/rails/engine.rb:518:in `call'
railties (4.2.11.3) lib/rails/application.rb:165:in `call'
railties (4.2.11.3) lib/rails/railtie.rb:194:in `public_send'
railties (4.2.11.3) lib/rails/railtie.rb:194:in `method_missing'
puma (5.5.2) lib/puma/configuration.rb:249:in `call'
puma (5.5.2) lib/puma/request.rb:77:in `block in handle_request'
puma (5.5.2) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.5.2) lib/puma/request.rb:76:in `handle_request'
puma (5.5.2) lib/puma/server.rb:447:in `process_client'
puma (5.5.2) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

I am just totally stumped as to where this reference to Moped is coming from. Tailing the puma log shows that the app is now booting but same error.

I'm kind of hoping someone maybe sees something I am missing or can provide any insights into previous experience that might help me eliminate this issue.

Aucun commentaire:

Enregistrer un commentaire