I just tested on linux and the lib version must be appended to be loaded correctly, libglfw.so.3 is a symlink of the latest version available on the system:
You can see here that with the right name, the lib is loaded:
irb(main):005:0> Fiddle.dlopen("libglfw.so")
/home/sebastien/.rbenv/versions/3.1.2/lib/ruby/3.1.0/fiddle.rb:61:in `initialize': libglfw.so: cannot open shared object file: No such file or directory (Fiddle::DLError)
from /home/sebastien/.rbenv/versions/3.1.2/lib/ruby/3.1.0/fiddle.rb:61:in `new'
from /home/sebastien/.rbenv/versions/3.1.2/lib/ruby/3.1.0/fiddle.rb:61:in `dlopen'
from (irb):5:in `<main>'
from /home/sebastien/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>'
from /home/sebastien/.rbenv/versions/3.1.2/bin/irb:25:in `load'
from /home/sebastien/.rbenv/versions/3.1.2/bin/irb:25:in `<main>'
irb(main):006:0> Fiddle.dlopen("libglfw.so.3")
=> #<Fiddle::Handle:0x00007f057c99e840>
I just tested on linux and the lib version must be appended to be loaded correctly, libglfw.so.3 is a symlink of the latest version available on the system:
You can see here that with the right name, the lib is loaded: