mysql2 - activerecord version compatibility list
In the course of doing upgrades for an older project I’ve discovered that not every
activerecord version is compatible with every
mysql2 version. The adapters use
~> to lock the gem version as a precaution. Functionally, everything seems fine.
Here’re the versions that work with each other
|0.4.x||4.2.5 - 5.0, >=5.0|
|0.3.x||3.1, 3.2, 4.x, 5.0|
|0.2.x||2.3 - 3.0|
Unfortunately, I didn’t have the time to upgrade and test rails, so instead I had to edit that file directly.
If using rvm it’s located at
~/.rvm/gems/ruby-2.1.2@gemset/gems/activerecord-4.1.8/lib/active_record/connection_adapters and simply changing
gem 'mysql2', '~> 0.3.13' to
gem 'mysql2', '>= 0.3.13' worked.
Get in touch
Or send me feedback. It will take less than 20 seconds.