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

TypeError - Store can't be referred to #113

Open
cavoixanha opened this issue Jul 13, 2017 · 0 comments
Open

TypeError - Store can't be referred to #113

cavoixanha opened this issue Jul 13, 2017 · 0 comments

Comments

@cavoixanha
Copy link

When dump user use gem 'activerecord-session_store' and 'devise' is error method " Marshal.dump(value)", restart server then login, it is working success!
I store model Store by session[:my_store] = current_user.store
How to resolve errors!

Log:

TypeError - Store can't be referred to:
  activerecord-session_store (1.0.0) lib/active_record/session_store.rb:62:in `dump'
  activerecord-session_store (1.0.0) lib/active_record/session_store.rb:13:in `serialize'
  activerecord-session_store (1.0.0) lib/active_record/session_store/session.rb:84:in `serialize_data!'
  activesupport (5.0.1) lib/active_support/callbacks.rb:382:in `block in make_lambda'
  activesupport (5.0.1) lib/active_support/callbacks.rb:169:in `block (2 levels) in halting'
  activesupport (5.0.1) lib/active_support/callbacks.rb:770:in `block (2 levels) in deprecated_false_terminator'
  activesupport (5.0.1) lib/active_support/callbacks.rb:769:in `block in deprecated_false_terminator'
  activesupport (5.0.1) lib/active_support/callbacks.rb:170:in `block in halting'
  activesupport (5.0.1) lib/active_support/callbacks.rb:454:in `block in call'
  activesupport (5.0.1) lib/active_support/callbacks.rb:454:in `call'
  activesupport (5.0.1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
  activesupport (5.0.1) lib/active_support/callbacks.rb:750:in `_run_save_callbacks'
  activerecord (5.0.1) lib/active_record/callbacks.rb:298:in `create_or_update'
  activerecord (5.0.1) lib/active_record/persistence.rb:125:in `save'
  activerecord (5.0.1) lib/active_record/validations.rb:44:in `save'
  activerecord (5.0.1) lib/active_record/attribute_methods/dirty.rb:22:in `save'
  activerecord (5.0.1) lib/active_record/transactions.rb:319:in `block (2 levels) in save'
  activerecord (5.0.1) lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status'
  activerecord (5.0.1) lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
  activerecord (5.0.1) lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
  activerecord (5.0.1) lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
  activerecord (5.0.1) lib/active_record/transactions.rb:211:in `transaction'
  activerecord (5.0.1) lib/active_record/transactions.rb:392:in `with_transaction_returning_status'
  activerecord (5.0.1) lib/active_record/transactions.rb:319:in `block in save'
  activerecord (5.0.1) lib/active_record/transactions.rb:334:in `rollback_active_record_state!'
  activerecord (5.0.1) lib/active_record/transactions.rb:318:in `save'
  activerecord (5.0.1) lib/active_record/suppressor.rb:41:in `save'
  activerecord-session_store (1.0.0) lib/action_dispatch/session/active_record_store.rb:85:in `block in write_session'
  activerecord-session_store (1.0.0) lib/active_record/session_store/extension/logger_silencer.rb:47:in `silence_logger'
  activerecord-session_store (1.0.0) lib/action_dispatch/session/active_record_store.rb:82:in `write_session'
  rack (2.0.1) lib/rack/session/abstract/id.rb:344:in `commit_session'
  rack (2.0.1) lib/rack/session/abstract/id.rb:224:in `context'
  rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/cookies.rb:613:in `call'
  activerecord (5.0.1) lib/active_record/migration.rb:553:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
  activesupport (5.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
  activesupport (5.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
  activesupport (5.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
  actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
  web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app'
  web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call'
  web-console (3.4.0) lib/web_console/middleware.rb:18:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
  railties (5.0.1) lib/rails/rack/logger.rb:36:in `call_app'
  railties (5.0.1) lib/rails/rack/logger.rb:24:in `block in call'
  activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:in `block in tagged'
  activesupport (5.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:in `tagged'
  railties (5.0.1) lib/rails/rack/logger.rb:24:in `call'
  sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
  rack (2.0.1) lib/rack/method_override.rb:22:in `call'
  rack (2.0.1) lib/rack/runtime.rb:22:in `call'
  activesupport (5.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
  actionpack (5.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
  rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
  rack-cors (0.4.1) lib/rack/cors.rb:81:in `call'
  railties (5.0.1) lib/rails/engine.rb:522:in `call'
  puma (3.6.2) lib/puma/configuration.rb:225:in `call'
  puma (3.6.2) lib/puma/server.rb:578:in `handle_request'
  puma (3.6.2) lib/puma/server.rb:415:in `process_client'
  puma (3.6.2) lib/puma/server.rb:275:in `block in run'
  puma (3.6.2) lib/puma/thread_pool.rb:116:in `block in spawn_thread'

Started POST "/__better_errors/7830e9a74c98e08a/variables" for 127.0.0.1 at 2017-07-13 11:13:01 +0700
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