puma: Windows: puma_http11.so breaking when ruby folder is relocated

I’m trying to repackage rubyinstaller-3.2.2-1-x64.7z with binary gems compiled, including Puma, so we don’t have to install msys64 on customer’s machines.

We don’t always dictate where we install. It may go on C: , P:, N:

When unzipped on a different drive - paths properly set up - I get the dump

<internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': 126: The specified module could not be found.   - p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/puma-6.4.0/lib/puma/puma_http11.so (LoadError)
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/puma-6.4.0/lib/puma.rb:12:in `<main>'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:55:in `each'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:55:in `block in require'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:44:in `each'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:44:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/bundler.rb:187:in `require'
        from P:/NHM/mdw63/plugins/mdw_core/config/application.rb:19:in `<main>'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from P:/NHM/mdw63/solutions/automator/config/application.rb:1:in `<main>'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands/server/server_command.rb:139:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands/server/server_command.rb:136:in `perform'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command/base.rb:178:in `invoke_command'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command/base.rb:73:in `perform'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:71:in `block in invoke'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:149:in `with_argv'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:69:in `invoke'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands.rb:18:in `<main>'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:p:/NHM/Ruby3221a/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from bin/rails:4:in `<main>'

p:/NHM/Ruby3221a/lib/ruby/gems/3.2.0/gems/puma-6.4.0/lib/puma/puma_http11.so Exists. P:\NHM\Ruby3221a\lib\ruby\gems\3.2.0\extensions\x64-mingw-ucrt\3.2.0\puma-6.4.0\puma/puma_http11.so also exists.

If I force re-installation of the gem - so it builds with the paths correct for the system - I have no dump, the server starts. But again, would like to avoid compiling on customer systems if possible.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

ridk exec pacman -Syuu

Ran twice … how did I not recognize pacman the first time

ruby -vrpuma -e "puts Puma::MiniSSL::OPENSSL_LIBRARY_VERSION, Puma::MiniSSL::OPENSSL_VERSION"
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]
OpenSSL 3.1.0 14 Mar 2023
OpenSSL 3.1.4 24 Oct 2023

And works after being relocated now.

Lovely. Thank you so much @MSP-Greg