You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem with Ruby gem mysql2 with windows ll
libmysql.dll in \ruby\bin
mysql client c (8.0.40)
mysql2 version (0.5.6)
ruby version 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
Single line ruby program:
require 'mysql2'
Fault:
internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb:136:in `require': Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.4.1. (RuntimeError)
Program crashes. Mysql client is 8.0. not 10.8.8, client library is 8.0.4 not 3.4.1
From lines ~ 1545 - 1550 in mysql2-0.5.6\mysq2\ext\client.c
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);
}
lib[i] and MYSQL_LINK_VERSION are miscomputed. The gem appears to have a bug when run on Win 11.
I commented this section and the gem now works fine on Win 11 after altering client.c and rebuilding and reinstalling the gem. I had no problem with Win 10
I don't know enough about MYSQL linkages to fix it.
The text was updated successfully, but these errors were encountered:
Problem with Ruby gem mysql2 with windows ll
libmysql.dll in \ruby\bin
mysql client c (8.0.40)
mysql2 version (0.5.6)
ruby version 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
Single line ruby program:
require 'mysql2'
Fault:
internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb:136:in `require': Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.4.1. (RuntimeError)
Program crashes. Mysql client is 8.0. not 10.8.8, client library is 8.0.4 not 3.4.1
From lines ~ 1545 - 1550 in mysql2-0.5.6\mysq2\ext\client.c
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);
}
lib[i] and MYSQL_LINK_VERSION are miscomputed. The gem appears to have a bug when run on Win 11.
I commented this section and the gem now works fine on Win 11 after altering client.c and rebuilding and reinstalling the gem. I had no problem with Win 10
I don't know enough about MYSQL linkages to fix it.
The text was updated successfully, but these errors were encountered: