[ruby-talk:444592] gem mysql2 doesn't work on windows 11

Problem with Ruby gem mysql2 with windows ll
libmysql.dll in \ruby\bin

Single line program:
require 'mysql2'

With Ruby 3.3.6 gem mysql2 2.4.6 running windows 11

<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)
from
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in
`require'
from
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/mysql2-0.5.6/lib/mysql2.rb:36:in
`<top (required)>'
from
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:141:in
`require'
from
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:141:in
`rescue in require'
from
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:135:in
`require'
from require.rb:1:in `<main>'
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in
`require': cannot load such file -- mysql2 (LoadError)
from
<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in
`require'
from require.rb:1:in `<main>'

Exit code: 1

With: Ruvy version 3.2.2 x64 mingw WUCRT gem: ruby-mysql2 version 0.5.4
Windows 10
Program works as exxpected

With: Ruvy version 3.2.2 x64 mingw WUCRT gem: ruby-mysql2 version 0.5.4
Windows 11

E:/Ruby32-x64/lib/ruby/3.2.0/socket.rb:68:in `connect': A socket operation
encountered a dead network. - connect(2) for /tmp/mysql.sock
(Errno::ENETDOWN)
        from E:/Ruby32-x64/lib/ruby/3.2.0/socket.rb:68:in `connect_internal'
        from E:/Ruby32-x64/lib/ruby/3.2.0/socket.rb:141:in `connect'Ruvy
version 3.2.2 x64 mingw WUCRT Windows 10
        from E:/Ruby32-x64/lib/ruby/3.2.0/socket.rb:1081:in `unix'Program
works as expected
        from
E:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-mysql-4.0.0/lib/mysql/protocol.rb:177:in
`initialize'
        from
E:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-mysql-4.0.0/lib/mysql.rb:195:in
`new'
        from
E:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-mysql-4.0.0/lib/mysql.rb:195:in
`connect'
        from
E:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-mysql2-0.5.4/lib/mysql2/client.rb:180:in
`connect'
        from
E:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-mysql2-0.5.4/lib/mysql2/client.rb:169:in
`initialize'
        from ./require.rb:11:in `new'
        from ./require.rb:11:in `<main>'

What is the problem with the ruby gem on windows 11? Any suggested fix
please?

Tom Reilly

  Any suggested fix please?