The ActiveRecord session store has been extracted out of Rails into it's own gem as part of Rails move towards better modularity. You need to include the gem as shown below in your Gemfile
to get access to the rake
task and related functionality.
gem 'activerecord-session_store', github: 'rails/activerecord-session_store'
See the README of the gem linked above for more instructions, but you still need run the following command after installing the gem
rails generate active_record:session_migration
and after that you need to modify the config/initializers/session_store.rb to look like something like this
MyApp::Application.config.session_store :active_record_store, :key => '_Application_session'
or
Rails.application.config.session_store :active_record_store, :key => '_Application_session'
depending on your Rails version.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…