projectblacklight / spotlight

Spotlight enables librarians, curators, and others who are responsible for digital collections to create attractive, feature-rich websites that highlight these collections.
Other
161 stars 65 forks source link

NoMethodError under ruby 2.5.3, rails 5.2.2 #2127

Open whisere opened 5 years ago

whisere commented 5 years ago

Does spotlight work under these versons: ruby 2.5.3, rails 5.2.2

reported error: NoMethodError (undefined method `current_exhibit=' for I18n::Backend::ActiveRecord::Translation(Table doesn't exist):Class Did you mean? current_scope=):

activerecord (5.2.2) lib/active_record/dynamic_matchers.rb:22:in method_missing' /home/user/.rvm/gems/ruby-2.5.3/bundler/gems/spotlight-b26e1684c1f1/app/controllers/concerns/spotlight/controller.rb:15:inset_exhibit_locale_scope' activesupport (5.2.2) lib/active_support/callbacks.rb:426:in block in make_lambda' activesupport (5.2.2) lib/active_support/callbacks.rb:198:inblock (2 levels) in halting' actionpack (5.2.2) lib/abstract_controller/callbacks.rb:34:in block (2 levels) in <module:Callbacks>' activesupport (5.2.2) lib/active_support/callbacks.rb:199:inblock in halting' activesupport (5.2.2) lib/active_support/callbacks.rb:513:in block in invoke_before' activesupport (5.2.2) lib/active_support/callbacks.rb:513:ineach' activesupport (5.2.2) lib/active_support/callbacks.rb:513:in invoke_before' activesupport (5.2.2) lib/active_support/callbacks.rb:131:inrun_callbacks' actionpack (5.2.2) lib/abstract_controller/callbacks.rb:41:in process_action' actionpack (5.2.2) lib/action_controller/metal/rescue.rb:22:inprocess_action' actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:34:in block in process_action' activesupport (5.2.2) lib/active_support/notifications.rb:168:inblock in instrument' activesupport (5.2.2) lib/active_support/notifications/instrumenter.rb:23:in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:ininstrument' actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:32:in process_action' actionpack (5.2.2) lib/action_controller/metal/params_wrapper.rb:256:inprocess_action' activerecord (5.2.2) lib/active_record/railties/controller_runtime.rb:24:in process_action' actionpack (5.2.2) lib/abstract_controller/base.rb:134:inprocess' actionview (5.2.2) lib/action_view/rendering.rb:32:in process' actionpack (5.2.2) lib/action_controller/metal.rb:191:indispatch' actionpack (5.2.2) lib/action_controller/metal.rb:252:in dispatch' actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:52:indispatch' actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:34:in serve' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:52:inblock in serve' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in each' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:inserve' actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:840:in call' warden (1.2.8) lib/warden/manager.rb:36:inblock in call' warden (1.2.8) lib/warden/manager.rb:34:in catch' warden (1.2.8) lib/warden/manager.rb:34:incall' rack (2.0.6) lib/rack/tempfile_reaper.rb:15:in call' rack (2.0.6) lib/rack/etag.rb:25:incall' rack (2.0.6) lib/rack/conditional_get.rb:25:in call' rack (2.0.6) lib/rack/head.rb:12:incall' actionpack (5.2.2) lib/action_dispatch/http/content_security_policy.rb:18:in call' rack (2.0.6) lib/rack/session/abstract/id.rb:232:incontext' rack (2.0.6) lib/rack/session/abstract/id.rb:226:in call' actionpack (5.2.2) lib/action_dispatch/middleware/cookies.rb:670:incall' activerecord (5.2.2) lib/active_record/migration.rb:559:in call' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' activesupport (5.2.2) lib/active_support/callbacks.rb:98:in run_callbacks' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:26:incall' actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in call' actionpack (5.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:61:incall' web-console (3.7.0) lib/web_console/middleware.rb:135:in call_app' web-console (3.7.0) lib/web_console/middleware.rb:22:inblock in call' web-console (3.7.0) lib/web_console/middleware.rb:20:in catch' web-console (3.7.0) lib/web_console/middleware.rb:20:incall' actionpack (5.2.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in call' railties (5.2.2) lib/rails/rack/logger.rb:38:incall_app' railties (5.2.2) lib/rails/rack/logger.rb:26:in block in call' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:inblock in tagged' activesupport (5.2.2) lib/active_support/tagged_logging.rb:28:in tagged' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:intagged' railties (5.2.2) lib/rails/rack/logger.rb:26:in call' sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:incall' actionpack (5.2.2) lib/action_dispatch/middleware/remote_ip.rb:81:in call' request_store (1.4.1) lib/request_store/middleware.rb:19:incall' actionpack (5.2.2) lib/action_dispatch/middleware/request_id.rb:27:in call' rack (2.0.6) lib/rack/method_override.rb:22:incall' rack (2.0.6) lib/rack/runtime.rb:22:in call' activesupport (5.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:incall' actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in call' actionpack (5.2.2) lib/action_dispatch/middleware/static.rb:127:incall' rack (2.0.6) lib/rack/sendfile.rb:111:in call' railties (5.2.2) lib/rails/engine.rb:524:incall' puma (3.12.0) lib/puma/configuration.rb:225:in call' puma (3.12.0) lib/puma/server.rb:658:inhandle_request' puma (3.12.0) lib/puma/server.rb:472:in process_client' puma (3.12.0) lib/puma/server.rb:332:inblock in run' puma (3.12.0) lib/puma/thread_pool.rb:133:in `block in spawn_thread'

Thanks!

jkeck commented 5 years ago

We are running our Spotlight instance @ Stanford under rails 5.2.2 and ruby 2.5.3.

Are you getting this error running a new application or upgrading an existing application?

Also, just to be sure, make sure you have copied app database migrations from spotlight.

$  bundle exec rake spotlight:install:migrations
$  bundle exec rake db:migrate
whisere commented 5 years ago

Thank you! I tried new and exiting application, they both have the same results. Running the two commands above worked! How to upgrade an existing application? I can't find the related doc? Thanks!