This should be fixed in the latest LTS-branches of our mysql2 fork Show archive.org snapshot , 0.2.x-lts and 0.3.x-lts.
Use
gem 'mysql2', git: 'https://github.com/makandra/mysql2', branch: '0.2.x-lts' # for Rails 2.x
gem 'mysql2', git: 'https://github.com/makandra/mysql2', branch: '0.3.x-lts' # for Rails 3.x
in your Gemfile, and do a
bundle update mysql2
Background
mysql2 used to check that the client library used at runtime actually matches the one it was compiled against. However, at least on Ubuntu 22.04, the mariadb library files themselves seem to report 2 conflicting versions.
The fix simply removes that check on non-Windows platforms (as is the case in current mysql2 versions), reasoning that Linux should enforce this anyways.
Posted by Tobias Kraze to makandra dev (2022-07-29 11:40)