There are two apps. One of the apps is using rails 4.1.2. The other app is using rails 5.0.1. Here is how the rails 5 app works: it checks if the user is logged in:
- If the user is logged in: then the user should be able to proceed forward.
- If the user is NOT logged in, then it redirects them to the rails 4 app (which is where the user can log in). Once the user is logged in with the rails 4 app: the user should be able to access the rails 5 app no problem.
I am currently using the following gems in my Rails 5 project:
gem 'mysql2', '~> 0.4.4'
gem 'activerecord-session_store', '~> 1.0'
I then have the following in my config/initializers/session_store.rb
file:
Rails.application.config.session_store :active_record_store, :key => ‘SOME_KEY’
Currently: if the user is not logged in: then it successfully redirects the user. The issue is when the user is logged in. I get this error when the logged in user attempts to access the rails 5 app:
NameError (uninitialized constant ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column)
- I do notice that the app is successfully connecting to the database
- The app also appears to access the
sessions
table on initial request (when the user is not logged in).
Any suggestions on what is triggering this error and how to fix it? Ultimately: it almost appears as though rails 5
is incompatible with activerecord-session_store
and mysql2
.