From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2025-10-30T03:32:52+00:00 Subject: [ruby-core:123608] [Ruby Bug#21645] Can't `require "resolve"` on Windows under Bundler without warnings Issue #21645 has been updated by hsbt (Hiroshi SHIBATA). @Earlopain Thanks for your confirmation. I fixed that at `ruby/resolv` and `ruby/ruby`. ---------------------------------------- Bug #21645: Can't `require "resolve"` on Windows under Bundler without warnings https://bugs.ruby-lang.org/issues/21645#change-114991 * Author: Earlopain (Earlopain _) * Status: Closed * Assignee: hsbt (Hiroshi SHIBATA) * ruby -v: ruby 3.5.0dev (2025-10-19 master 957c832db1) +PRISM [x64-mingw-ucrt] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `prism` had disabled some workflows for ruby-head on windows because of the extraction from fiddle to being a bundled gem. I attempted to renable them now, but it is still an issue: https://github.com/ruby/prism/pull/3687 During `bundle install`, the `mini_portile2` gem (to build `nokogiri`) ends up requiring `net/http`, which in turn requires `resolv`. On windows, `resolv` requires `win32/resolv` here: https://github.com/ruby/ruby/blob/6eb75f6c36288cdd7522f27ad18608d13031f2b8/lib/resolv.rb#L1026-L1027. `win32-registry` depends on `fiddle`, and so under bundler it fails with the following: ``` D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/specification.rb:1419:in 'block in Gem::Specification#activate_dependencies': Could not find 'fiddle' (~> 1.0) among 61 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=D:/a/prism/prism/vendor/bundle/ruby/3.5.0+4' at: D:/rubyinstaller-head-x64/lib/ruby/gems/3.5.0+4/specifications/win32-registry-0.1.0.gemspec, execute `gem env` for more information from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/specification.rb:1405:in 'Array#each' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/specification.rb:1405:in 'Gem::Specification#activate_dependencies' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/specification.rb:1387:in 'Gem::Specification#activate' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/core_ext/kernel_gem.rb:62:in 'block in Kernel#gem' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/core_ext/kernel_gem.rb:62:in 'Thread::Mutex#synchronize' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/rubygems/core_ext/kernel_gem.rb:62:in 'Kernel#gem' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/resolv.rb:1026:in 'Kernel#require' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/resolv.rb:1026:in 'Resolv::DNS::Config.default_config_hash' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/resolv.rb:95:in 'Resolv#initialize' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/resolv.rb:3469:in '' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/resolv.rb:35:in '' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/net/http.rb:25:in 'Kernel#require' from D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/net/http.rb:25:in '' from D:/a/prism/prism/vendor/bundle/ruby/3.5.0+4/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:2:in 'Kernel#require' ``` I have tried to make a small reproduction by simply running `bundle exec ruby -rresolv` but there I just get a warning: ``` D:/rubyinstaller-head-x64/lib/ruby/3.5.0+4/win32/registry.rb:2: warning: fiddle/import is found in fiddle, which is not part of the default gems since Ruby 3.5.0. You can add fiddle to your Gemfile or gemspec to fix this error. ``` I am not sure why that is. I feel like it should at the very least raise. But I don't have a windows machine to investigate this. Here is a github action run that shows this: https://github.com/Earlopain/test/actions/runs/18653590178/job/53177107372 There is also a github issue: https://github.com/ruby/win32-registry/issues/11 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/