I have this error where run my program on Windows x64 Operating Sistem.
First of all in the file "c:\ruby34-x64\msys64\ucrt64\include\mysql\mariadb_version.h" I have change this line " #define MARIADB_CLIENT_VERSION_STR "3.4.3" "
Because otherwise an error appears about the match of the database version.
Also in then "mysql2\ext\mysql2\client.c" I have commented this lines
/*
if (lib[i] != MYSQL_LINK_VERSION[i]) {
rb_raise(rb_eRuntimeError, "Incorrect MySQL client library version! This gem was compiled for %s but the client library is %s.", MYSQL_LINK_VERSION, lib);
}*/
Make that I have install mysql2 with this command:
gem build .\mysql2.gemspec
gem install .\mysql2-0.5.6.gem -- --with-mysql-dir=d:/ruby_pgm/mariadb-connector-c
The library is install correctly but the error in the object appears when run my program.
Can anyone help me ?