ruby 未初始化的常量Devise::SessionsController

zqry0prt  于 2023-04-05  发布在  Ruby
关注(0)|答案(1)|浏览(129)

I have rails application that was built on ruby 2.7.1, rails 5.2, devise 4.7.2, and activeadmin 2.9.0. i want to update it to the current versions. when i update the ruby to 3.2.1, rails to 7.0, devise to 4.9.2, and activeadmin to 2.13, i got the uninitialized constant Devise::SessionsController in gem lib file .rvm/gems/ruby-3.2.1/gems/activeadmin-2.13.1/lib/active_admin/devise.rb:54:in module:Devise': uninitialized constant Devise::SessionsController (NameError)
from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/activeadmin-2.13.1/lib/active_admin/devise.rb:7:in <module:ActiveAdmin>' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/activeadmin-2.13.1/lib/active_admin/devise.rb:6:in ' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/zeitwerk-2.6.4/lib/zeitwerk/kernel.rb:38:in require' from /home/ahmad/Project/cuddleClone/oms-version-update/config/initializers/active_admin.rb:350:in ' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:667:in load' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:667:in block in load_config_initializer' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/activesupport-7.0.4.3/lib/active_support/notifications.rb:208:in instrument' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:666:in load_config_initializer' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:620:in block (2 levels) in <class:Engine>' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:619:in each' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/engine.rb:619:in block in <class:Engine>' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:32:in instance_exec' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:32:in run' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:61:in block in run_initializers' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:228:in block in tsort_each' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:431:in each_strongly_connected_component_from' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:421:in block in each_strongly_connected_component_from' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:50:in each' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:50:in tsort_each_child' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:415:in call' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:415:in each_strongly_connected_component_from' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:349:in block in each_strongly_connected_component' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:347:in each' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:347:in call' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:347:in each_strongly_connected_component' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:226:in tsort_each' from /home/ahmad/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/tsort.rb:205:in tsort_each' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/initializable.rb:60:in run_initializers' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/application.rb:372:in initialize!' from /home/ahmad/Project/cuddleClone/oms-version-update/config/environment.rb:5:in ' from config.ru:3:in require_relative' from config.ru:3:in block in ' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/builder.rb:116:in eval' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/builder.rb:116:in new_from_string' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/builder.rb:105:in load_file' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/builder.rb:66:in parse_file' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/server.rb:349:in build_app_and_options_from_config' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/server.rb:249:in app' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/rack-2.2.6.4/lib/rack/server.rb:422:in wrapped_app' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:76:in log_to_stdout' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:36:in start' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:143:in block in perform' from internal:kernel:90:in tap' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:134:in perform' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/command/base.rb:87:in perform' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/command.rb:48:in invoke' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in ' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from /home/ahmad/Project/cuddleClone/oms-version-update/bin/rails:9:in <top (required)>' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in load' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in call' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/client/command.rb:7:in call' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/client.rb:30:in run' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/bin/spring:49:in <top (required)>' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/binstub.rb:11:in load' from /home/ahmad/.rvm/gems/ruby-3.2.1/gems/spring-2.1.1/lib/spring/binstub.rb:11:in <top (required)>' from /home/ahmad/Project/cuddleClone/oms-version-update/bin/spring:15:in require' from /home/ahmad/Project/cuddleClone/oms-version-update/bin/spring:15:in <top (required)>' from bin/rails:3:in load' from bin/rails:3:in '
it needs to be working properly.

ylamdve6

ylamdve61#

这是命名错误。Active Admin正在搜索找不到的会话**% s**控制器(额外% s)。您应该检查会话的设备控制器的命名。
也许你有SessionController而不是SessionsController

相关问题