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 method `before_filter' for Spotlight::ExhibitsController:Class #2

Open
mephillips-durham opened this issue Nov 15, 2023 · 0 comments

Comments

@mephillips-durham
Copy link

After fixing the TODO in the description via a fork I succeeded in installing the gem alongside an up to date Spotlight. The rails server restarts OK, but as soon as I access the Spotlight interface in the web browser I get the above error and the following stack trace.

I appreciate this code probably cannot be expected to work now, as it's quite old, but we were looking for a simple example to sue as a starting point. Even if there's no point fixing it, recording the issue might help someone.

undefined method `before_filter' for Spotlight::ExhibitsController:Class

Rails.root: /home/vagrant/dur-spotlight

Application Trace | Framework Trace | Full Trace
cancan (1.6.10) lib/cancan/controller_resource.rb:9:in `add_before_filter'
cancan (1.6.10) lib/cancan/controller_additions.rb:15:in `load_and_authorize_resource'
spotlight (0f5a47eefe43) app/controllers/spotlight/exhibits_controller.rb:11:in `<class:ExhibitsController>'
spotlight (0f5a47eefe43) app/controllers/spotlight/exhibits_controller.rb:6:in `<module:Spotlight>'
spotlight (0f5a47eefe43) app/controllers/spotlight/exhibits_controller.rb:3:in `<main>'
<internal:/home/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
bootsnap (1.16.0) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
zeitwerk (2.6.12) lib/zeitwerk/kernel.rb:30:in `require'
activesupport (7.0.8) lib/active_support/inflector/methods.rb:278:in `const_get'
activesupport (7.0.8) lib/active_support/inflector/methods.rb:278:in `constantize'
activesupport (7.0.8) lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
actionpack (7.0.8) lib/action_dispatch/http/request.rb:90:in `controller_class_for'
actionpack (7.0.8) lib/action_dispatch/request/utils.rb:95:in `action_encoding_template'
actionpack (7.0.8) lib/action_dispatch/request/utils.rb:83:in `encode'
actionpack (7.0.8) lib/action_dispatch/request/utils.rb:45:in `set_binary_encoding'
actionpack (7.0.8) lib/action_dispatch/http/parameters.rb:68:in `path_parameters='
actionpack (7.0.8) lib/action_dispatch/journey/router.rb:48:in `block in serve'
actionpack (7.0.8) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (7.0.8) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.0.8) lib/action_dispatch/routing/route_set.rb:852:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/static.rb:23:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.8) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.8) lib/rack/etag.rb:27:in `call'
rack (2.2.8) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.8) lib/rack/head.rb:12:in `call'
actionpack (7.0.8) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
actionpack (7.0.8) lib/action_dispatch/http/content_security_policy.rb:36:in `call'
rack (2.2.8) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.8) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/cookies.rb:704:in `call'
activerecord (7.0.8) lib/active_record/migration.rb:638:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (7.0.8) lib/active_support/callbacks.rb:99:in `run_callbacks'
actionpack (7.0.8) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
web-console (4.2.1) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.1) lib/web_console/middleware.rb:19:in `block in call'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/show_exceptions.rb:29:in `call'
railties (7.0.8) lib/rails/rack/logger.rb:40:in `call_app'
railties (7.0.8) lib/rails/rack/logger.rb:25:in `block in call'
activesupport (7.0.8) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (7.0.8) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (7.0.8) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (7.0.8) lib/rails/rack/logger.rb:25:in `call'
sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.8) lib/rack/method_override.rb:24:in `call'
rack (2.2.8) lib/rack/runtime.rb:22:in `call'
activesupport (7.0.8) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/server_timing.rb:61:in `block in call'
actionpack (7.0.8) lib/action_dispatch/middleware/server_timing.rb:26:in `collect_events'
actionpack (7.0.8) lib/action_dispatch/middleware/server_timing.rb:60:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/static.rb:23:in `call'
rack (2.2.8) lib/rack/sendfile.rb:110:in `call'
actionpack (7.0.8) lib/action_dispatch/middleware/host_authorization.rb:138:in `call'
railties (7.0.8) lib/rails/engine.rb:530:in `call'
puma (5.6.7) lib/puma/configuration.rb:252:in `call'
puma (5.6.7) lib/puma/request.rb:77:in `block in handle_request'
puma (5.6.7) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.6.7) lib/puma/request.rb:76:in `handle_request'
puma (5.6.7) lib/puma/server.rb:443:in `process_client'
puma (5.6.7) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
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

1 participant