Issue #22057 has been reported by tikkss (Tsutomu Katsube). ---------------------------------------- Bug #22057: test-bundler failed https://bugs.ruby-lang.org/issues/22057 * Author: tikkss (Tsutomu Katsube) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-03T21:56:31Z master 4b6040ca3e) +PRISM [x86_64-darwin24] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- test-bundler failed just one example (./spec/bundler/bundler/cli_common_spec.rb:7). However, test-bundler-parallel is successful. I think this is happening because while test-bundler includes the `--disable-gems` option, it is not specified in the command that launches rspec when running via turbo_tests (Please see comparison of test commands section). Steps to reproduce --- ```console $ git clone git@github.com:ruby/ruby.git $ cd ruby $ ./autogen.sh $ mkdir build && cd build $ mkdir ~/.rubies $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make $ make test-bundler BUNDLER_SPECS=bundler/cli_common_spec.rb ``` Expected result --- A spec is successful. Actual result --- Failed a spec as follows: ```console $ make test-bundler BUNDLER_SPECS=bundler/cli_common_spec.rb BASERUBY = /Users/zzz/.rbenv/shims/ruby --disable=gems CC = clang -std=gnu23 LD = ld LDSHARED = clang -std=gnu23 -dynamiclib CFLAGS = -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wshorten-64-to-32 -Wundef -pipe XCFLAGS = -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -DPRISM_XALLOCATOR -I. -I.ext/include/x86_64-darwin24 -I.ext/include -I../include -I.. -I../prism -I../enc/unicode/17.0.0 -Dmodular_gc_dir= CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT DLDFLAGS = -Wl,-undefined,dynamic_lookup -fstack-protector-strong -Wl,-pie -framework CoreFoundation SOLIBS = -lgmp -ldl -lobjc -lpthread LANG = en_US.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --cfg feature="stats_allocator" -g -C lto=thin -C opt-level=3 -C overflow-checks=on --edition=2021 '--out-dir=/tmp/ruby/build/target/release/' '../yjit/src/lib.rs' ZJIT_RUSTC_ARGS = --crate-name=zjit --crate-type=staticlib --cfg feature="stats_allocator" -g -C lto=thin -C opt-level=3 -C overflow-checks=on --edition=2024 '--out-dir=/tmp/ruby/build/target/release/' '../zjit/src/lib.rs' Apple clang version 17.0.0 (clang-1700.6.4.2) Target: x86_64-apple-darwin24.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin generating enc.mk making srcs under enc make[1]: Nothing to be done for `srcs'. generating transdb.h transdb.h unchanged generating makefiles ext/configure-ext.mk ext/configure-ext.mk updated generating makefile exts.mk exts.mk unchanged make[2]: `ruby' is up to date. make[1]: Nothing to be done for `note'. making enc make[1]: Nothing to be done for `enc'. making trans make[1]: Nothing to be done for `trans'. making encs make[1]: Nothing to be done for `encs'. ./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems -C .. -Ilib -r./tool/lib/bundle_env.rb \ spec/bin/bundle install --quiet --gemfile=tool/bundler/dev_gems.rb ./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems \ -r./x86_64-darwin24-fake \ -r../tool/lib/_tmpdir \ -I../spec/bundler -I../spec/lib \ -e "Dir.chdir(ARGV.shift); load('spec/bin/rspec')" \ -s -- -no-report-tmpdir -- ".." \ -r spec_helper -r formatter_overrides spec/bundler/bundler/cli_common_spec.rb Run options: exclude {mri_only: false, man: false, truffleruby_only: true, jruby_only: true, readline: false, permissions: false, no_color_tty: false, ruby_repo: true, git: "2.54.0", rubygems: "4.1.0.dev", realworld: true} F Failures: 1) Bundler::CLI::Common gem_not_found_message should suggest alternate gem names Failure/Error: expect(message).to match("Did you mean 'rails'?") expected "Could not find gem 'ralis'." to match "Did you mean 'rails'?" # ./spec/bundler/bundler/cli_common_spec.rb:11:in 'block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:164:in 'block (4 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:164:in 'block (3 levels) in <top (required)>' # ./spec/bundler/support/helpers.rb:414:in 'block in Spec::Helpers#with_gem_path_as' # ./spec/bundler/support/helpers.rb:428:in 'Spec::Helpers#without_env_side_effects' # ./spec/bundler/support/helpers.rb:409:in 'Spec::Helpers#with_gem_path_as' # ./spec/bundler/spec_helper.rb:163:in 'block (2 levels) in <top (required)>' # ./spec/bundler/support/rubygems_ext.rb:132:in 'Kernel#load' # ./spec/bundler/support/rubygems_ext.rb:132:in 'Spec::Rubygems#gem_load_and_activate' # ./spec/bundler/support/rubygems_ext.rb:16:in 'Spec::Rubygems#gem_load' # -e:1:in 'Kernel#load' # -e:1:in '<main>' Finished in 1 minute 9.5 seconds (files took 0.20881 seconds to load) 1 example, 1 failure Failed examples: rspec ./spec/bundler/bundler/cli_common_spec.rb:7 # Bundler::CLI::Common gem_not_found_message should suggest alternate gem names make: *** [yes-test-bundler] Error 1 ``` Comparison of test commands --- test-bundler: ```console ./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems \ -r./x86_64-darwin24-fake \ -r../tool/lib/_tmpdir \ -I../spec/bundler -I../spec/lib \ -e "Dir.chdir(ARGV.shift); load('spec/bin/rspec')" \ -s -- -no-report-tmpdir -- ".." \ -r spec_helper -r formatter_overrides spec/bundler/bundler/cli_common_spec.rb ``` test-bundler-parallel: ```console ./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems \ -r./x86_64-darwin24-fake \ -r../tool/lib/_tmpdir \ -I../spec/bundler \ -e "ruby = ENV['RUBY']" \ -e "ARGV[-1] = File.expand_path(ARGV[-1])" \ -e "ENV['RSPEC_EXECUTABLE'] = ruby + ARGV.shift" \ -e "load ARGV.shift" \ -s -- -no-report-tmpdir -- \ " -C .. -Ispec/bundler -Ispec/lib .bundle/bin/rspec -r spec_helper" \ ../spec/bin/parallel_rspec -r formatter_overrides \ --runtime-log ../tmp/parallel_runtime_rspec.log ../spec/bundler/bundler/cli_common_spec.rb ``` See also --- * https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html * https://docs.ruby-lang.org/en/master/contributing/testing_ruby_md.html -- https://bugs.ruby-lang.org/