Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined local variable or method `name' for #<RailsAdmin::MainController #3454

Closed
seb-sykio opened this issue Jan 3, 2022 · 3 comments
Closed

Comments

@seb-sykio
Copy link

hi
we updated from ruby2.7 to ruby 3 and from rails6.1 to rails7
since the update, everything is ok on development environment, but we can't access anymore to rails_admin in staging environment.
we only have this error :
NameError: undefined local variable or method `name' for #RailsAdmin::MainController:0x000000000c74c0 (Most recent call first)
gems/rails_admin-3.0.0.beta2/app/controllers/rails_admin/main_controller.rb line 47 in method_missing
gems/rails_admin-3.0.0.beta2/app/controllers/rails_admin/main_controller.rb line 52 in respond_to_missing?

any idea how we could debug this ?
thanks

@mshibuya
Copy link
Member

mshibuya commented Jan 4, 2022

Full stack trace, please.

@seb-sykio
Copy link
Author

NameError: undefined local variable or method `name' for #RailsAdmin::MainController:0x000000000c4db0

1 File "shared/bundle/ruby/3.0.0/gems/rails_admin-3.0.0.beta2/app/controllers/rails_admin/main_controller.rb" line 47 in method_missing
2 File "shared/bundle/ruby/3.0.0/gems/rails_admin-3.0.0.beta2/app/controllers/rails_admin/main_controller.rb" line 52 in respond_to_missing?
3 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/core_ext/object/blank.rb" line 19 in respond_to?
4 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/core_ext/object/blank.rb" line 19 in blank?
5 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/core_ext/object/blank.rb" line 26 in present?
6 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/script_tag.rb" line 128 in find_current_user_details
7 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/script_tag.rb" line 30 in initialize
8 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/auto_include_filter.rb" line 85 in new
9 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/auto_include_filter.rb" line 85 in intercom_script_tag
10 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/auto_include_filter.rb" line 44 in include_javascript?
11 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/auto_include_filter.rb" line 19 in filter
12 File "shared/bundle/ruby/3.0.0/gems/intercom-rails-0.4.2/lib/intercom-rails/auto_include_filter.rb" line 8 in intercom_rails_auto_include
13 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 400 in block in make_lambda
14 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 247 in block in halting
15 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 599 in block in invoke_after
16 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 599 in each
17 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 599 in invoke_after
18 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 132 in block in run_callbacks
19 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 138 in run_callbacks
20 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/abstract_controller/callbacks.rb" line 233 in process_action
21 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal/rescue.rb" line 22 in process_action
22 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal/instrumentation.rb" line 67 in block in process_action
23 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/notifications.rb" line 206 in block in instrument
24 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/notifications/instrumenter.rb" line 24 in instrument
25 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/notifications.rb" line 206 in instrument
26 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal/instrumentation.rb" line 66 in process_action
27 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal/params_wrapper.rb" line 259 in process_action
28 File "shared/bundle/ruby/3.0.0/gems/activerecord-7.0.0/lib/active_record/railties/controller_runtime.rb" line 27 in process_action
29 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/abstract_controller/base.rb" line 151 in process
30 File "shared/bundle/ruby/3.0.0/gems/actionview-7.0.0/lib/action_view/rendering.rb" line 39 in process
31 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal.rb" line 188 in dispatch
32 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal.rb" line 251 in dispatch
33 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/route_set.rb" line 49 in dispatch
34 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/route_set.rb" line 32 in serve
35 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 50 in block in serve
36 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 32 in each
37 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 32 in serve
38 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/route_set.rb" line 850 in call
39 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb" line 530 in call
40 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/railtie.rb" line 224 in public_send
41 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/railtie.rb" line 224 in method_missing
42 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/mapper.rb" line 19 in block in class:Constraints
43 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/mapper.rb" line 48 in serve
44 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 50 in block in serve
45 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 32 in each
46 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/journey/router.rb" line 32 in serve
47 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/routing/route_set.rb" line 850 in call
48 File "shared/bundle/ruby/3.0.0/gems/omniauth-2.0.4/lib/omniauth/strategy.rb" line 202 in call!
49 File "shared/bundle/ruby/3.0.0/gems/omniauth-2.0.4/lib/omniauth/strategy.rb" line 169 in call
50 File "shared/bundle/ruby/3.0.0/gems/rack-pjax-1.1.0/lib/rack/pjax.rb" line 12 in call
51 File "shared/bundle/ruby/3.0.0/gems/rack-attack-6.5.0/lib/rack/attack.rb" line 99 in call
52 File "shared/bundle/ruby/3.0.0/gems/http_accept_language-2.1.1/lib/http_accept_language/middleware.rb" line 14 in call
53 File "shared/bundle/ruby/3.0.0/gems/rack-attack-6.5.0/lib/rack/attack.rb" line 113 in call
54 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/deflater.rb" line 44 in call
55 File "shared/bundle/ruby/3.0.0/gems/warden-1.2.9/lib/warden/manager.rb" line 36 in block in call
56 File "shared/bundle/ruby/3.0.0/gems/warden-1.2.9/lib/warden/manager.rb" line 34 in catch
57 File "shared/bundle/ruby/3.0.0/gems/warden-1.2.9/lib/warden/manager.rb" line 34 in call
58 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb" line 15 in call
59 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/etag.rb" line 27 in call
60 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/conditional_get.rb" line 27 in call
61 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/head.rb" line 12 in call
62 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/http/permissions_policy.rb" line 22 in call
63 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/http/content_security_policy.rb" line 18 in call
64 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb" line 266 in context
65 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb" line 260 in call
66 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/cookies.rb" line 693 in call
67 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/callbacks.rb" line 27 in block in call
68 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/callbacks.rb" line 99 in run_callbacks
69 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/callbacks.rb" line 26 in call
70 File "shared/bundle/ruby/3.0.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/rollbar.rb" line 25 in block in call
71 File "shared/bundle/ruby/3.0.0/gems/rollbar-3.3.0/lib/rollbar.rb" line 145 in scoped
72 File "shared/bundle/ruby/3.0.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/rollbar.rb" line 22 in call
73 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/debug_exceptions.rb" line 28 in call
74 File "shared/bundle/ruby/3.0.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/show_exceptions.rb" line 22 in call_with_rollbar
75 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/show_exceptions.rb" line 26 in call
76 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/rack/logger.rb" line 36 in call_app
77 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/rack/logger.rb" line 25 in block in call
78 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/tagged_logging.rb" line 99 in block in tagged
79 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/tagged_logging.rb" line 37 in tagged
80 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/tagged_logging.rb" line 99 in tagged
81 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/rack/logger.rb" line 25 in call
82 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/remote_ip.rb" line 93 in call
83 File "shared/bundle/ruby/3.0.0/gems/request_store-1.5.0/lib/request_store/middleware.rb" line 19 in call
84 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/request_id.rb" line 26 in call
85 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/method_override.rb" line 24 in call
86 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/runtime.rb" line 22 in call
87 File "shared/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/cache/strategy/local_cache_middleware.rb" line 29 in call
88 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/executor.rb" line 14 in call
89 File "shared/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/sendfile.rb" line 110 in call
90 File "shared/bundle/ruby/3.0.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/host_authorization.rb" line 131 in call
91 File "shared/bundle/ruby/3.0.0/gems/rack-cors-1.1.1/lib/rack/cors.rb" line 100 in call
92 File "shared/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb" line 530 in call
93 File "/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb" line 107 in process_request
94 File "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb" line 149 in accept_and_process_next_request
95 File "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb" line 110 in main_loop
96 File "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb" line 416 in block (3 levels) in start_threads
97 File "/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb" line 113 in block in create_thread_and_abort_on_exception

@mshibuya
Copy link
Member

mshibuya commented Jan 5, 2022

Sorry for the issue, just pushed the fix. Please try with the master branch.

gem 'rails_admin', github: 'railsadminteam/rails_admin'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants