Skip to content

Windows: gem "test-unit-ruby-core", git: "https://github.com/ruby/test-unit-ruby-core" raises the error, cannot load such file -- core_assertions (LoadError) #9782

Description

@junaruga

Describe the problem as clearly as you can

This issue comes from ruby/drb#55.

At the commit ruby/drb@2b002d4 in ruby/drb repository, I got CI failures in Windows head, mswin windows-latest cases. The failures didn't happen in Ubuntu cases.

https://github.com/ruby/drb/actions/runs/32029577375/job/95386338154?pr=54

Run bundle exec rake
D:/a/drb/drb/test/lib/helper.rb:2:in 'Kernel#require': cannot load such file -- core_assertions (LoadError)
	from D:/a/drb/drb/test/lib/helper.rb:2:in '<top (required)>'
	from <internal:D:/rubyinstaller-head-x64/lib/ruby/4.1.0+4/rubygems/core_ext/kernel_require.rb>:139:in 'Kernel#require'
rake aborted!
Command failed with status (1)
D:/a/drb/drb/vendor/bundle/ruby/4.1.0+4/gems/rake-13.4.2/exe/rake:27:in '<top (required)>'
D:/rubyinstaller-head-x64/bin/bundle:33:in '<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

The used Gemfile is below.

source "https://rubygems.org"

gemspec

gem "rake"
gem "test-unit"
gem "test-unit-ruby-core", git: "https://github.com/ruby/test-unit-ruby-core"

When changed the code as following on the PR ruby/drb#54. the CI failures disappeared. This is a workaround. I don't know why this fixed the CI failures.

diff --git a/Gemfile b/Gemfile
index e673971..39549fe 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,4 +4,4 @@ gemspec

 gem "rake"
 gem "test-unit"
-gem "test-unit-ruby-core", git: "https://github.com/ruby/test-unit-ruby-core"
+gem "test-unit-ruby-core"

I faced this issue in ruby/drb. But ruby/net-imap may face this issue too, as the Gemfile uses gem "test-unit-ruby-core", git: "https://github.com/ruby/test-unit-ruby-core" too.

Did you try upgrading rubygems & bundler?

According to the following CI log, it seems that rubygems & bundler are installed via ruby/setup-ruby@v1.

https://github.com/ruby/drb/actions/runs/32029577375/job/95386338154?pr=54#step:3:52

No

Post steps to reproduce the problem

First, fork https://github.com/ruby/drb.git repository.

Then

$ git checkout 2b002d4b9724fccd4772e3bc9675388964acc6a4
$ cd drb

Modify the CI file to trigger GitHub Actions on your fork repository.

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 39e89a3..72280d3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,8 +2,6 @@ name: test

 on:
   push:
-    branches:
-      - master
   pull_request:
   workflow_dispatch:

Push your working branch, and you see the CI failures in your repository.

Which command did you run?

$ bundle exec rake

What were you expecting to happen?

The command succeeds.

What happened instead?

The command failed as follows.

Run bundle exec rake
D:/a/drb/drb/test/lib/helper.rb:2:in 'Kernel#require': cannot load such file -- core_assertions (LoadError)
	from D:/a/drb/drb/test/lib/helper.rb:2:in '<top (required)>'
	from <internal:D:/rubyinstaller-head-x64/lib/ruby/4.1.0+4/rubygems/core_ext/kernel_require.rb>:139:in 'Kernel#require'
rake aborted!
Command failed with status (1)
D:/a/drb/drb/vendor/bundle/ruby/4.1.0+4/gems/rake-13.4.2/exe/rake:27:in '<top (required)>'
D:/rubyinstaller-head-x64/bin/bundle:33:in '<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

If not included with the output of your command, run bundle env and paste the output below

I ran the CI adding bundle env. The result is below.

https://github.com/junaruga/ruby-drb/actions/runs/32075182014/job/95526759922#step:4:24

Interesting I see there is no checksum for test-unit-ruby-core (1.0.15) in CHECKSUMS section.

Environment

Bundler       4.1.0.dev
  Platforms   ruby, x64-mingw-ucrt
Ruby          4.1.0p-1 (2026-08-17 revision b52af714453ae6a407161c4b8572e7ff8d53328c) [x64-mingw-ucrt]
  Full Path   D:/rubyinstaller-head-x64/bin/ruby.exe
  Config Dir  C:/ProgramData
RubyGems      4.1.0.dev
  Gem Home    D:/rubyinstaller-head-x64/lib/ruby/gems/4.1.0+4
  Gem Path    C:/Users/runneradmin/.local/share/gem/ruby/4.1.0+4;D:/rubyinstaller-head-x64/lib/ruby/gems/4.1.0+4
  User Home   C:/Users/runneradmin
  User Path   C:/Users/runneradmin/.local/share/gem/ruby/4.1.0+4
  Bin Dir     D:/rubyinstaller-head-x64/bin
Git           2.55.0.windows.3
Gem.ruby      D:/rubyinstaller-head-x64/bin/ruby.exe
bundle #!     :""||{ ""=> %q<-*- ruby -*-

Bundler Build Metadata

Timestamp  2026-08-17
Git SHA    unknown

test-unit
test-unit-ruby-core!

CHECKSUMS
drb (2.2.4)
power_assert (3.1.0) sha256=fefe98ed5d3140628138f3f9f9194d6ece01f1320e69700d3c928adca7518251
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
test-unit (3.7.8) sha256=689d1ca53f4d46f678b4e5d68d8e4294f87fc5e8b9238cc4de7c5727e8d65943
test-unit-ruby-core (1.0.15)

BUNDLED WITH
4.1.0.dev


## Gemspecs

### drb.gemspec

```ruby
begin
  require_relative "lib/drb/version"
rescue LoadError # Fallback to load version file in ruby core repository
  require_relative "version"
end

Gem::Specification.new do |spec|
  spec.name          = "drb"
  spec.version       = DRb::VERSION
  spec.authors       = ["Masatoshi SEKI"]
  spec.email         = ["seki@ruby-lang.org"]

  spec.summary       = %q{Distributed object system for Ruby}
  spec.description   = %q{Distributed object system for Ruby}
  spec.homepage      = "https://github.com/ruby/drb"
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
  spec.licenses      = ["Ruby", "BSD-2-Clause"]

  spec.metadata["homepage_uri"] = spec.homepage
  spec.metadata["source_code_uri"] = spec.homepage
  spec.metadata["changelog_uri"] =
    "#{spec.homepage}/releases/tag/v#{spec.version}"

  spec.files         = %w[
    LICENSE.txt
    drb.gemspec
    lib/drb.rb
    lib/drb/acl.rb
    lib/drb/drb.rb
    lib/drb/eq.rb
    lib/drb/extserv.rb
    lib/drb/extservm.rb
    lib/drb/gw.rb
    lib/drb/observer.rb
    lib/drb/ssl.rb
    lib/drb/timeridconv.rb
    lib/drb/unix.rb
    lib/drb/version.rb
    lib/drb/weakidconv.rb
  ]
  spec.require_paths = ["lib"]
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions