LoginSignup
10
4

More than 1 year has passed since last update.

ActionDispatch::Request::Session::DisabledSessionError: Your application has sessions disabled. To write to the session you must first configure a session storeが発生した時の対処法

Posted at

概要

  • ruby 3.1.2
  • rails 7.0.4
  • railsはAPIモードで利用

結論

config/application.rbに以下の3行を追記すれば解決する。

config/applicaton.rb
config.session_store :cookie_store, key: '_interslice_session'
config.middleware.use ActionDispatch::Cookies
config.middleware.use config.session_store, config.session_options

参考になれば幸いです。

参考文献

10
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
4