Skip to content

AppGeneratorTest fails only when RACK=head #56271

@yahonda

Description

@yahonda

Managed to reproduce Rails Nightly CI at
https://buildkite.com/rails/rails-nightly/builds/3273#019adbb7-a5ab-4bf5-89cd-2499de2d43fc/1413-1485

Steps to reproduce

  1. Install Ruby master branch
  2. Run these steps below:
git clone https://github.com/rails/rails
cd rails/railties
rm ../Gemfile.lock
export RACK=head
bundle install
bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib \
  test/generators/app_generator_test.rb -v --seed 59183 \
  -n '/test_(app_update_preserves_skip_action_mailbox|application_new_show_help_message_inside_existing_rails_directory)/'

Expected behavior

All of tests should pass.

Actual behavior

While test_app_update_preserves_skip_action_mailbox passes but
test_application_new_show_help_message_inside_existing_rails_directory fails as follows.

$ bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib \
  test/generators/app_generator_test.rb -v --seed 59183 \
  -n '/test_(app_update_preserves_skip_action_mailbox|application_new_show_help_message_inside_existing_rails_directory)/'
/home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/gems/4.0.0+0/gems/i18n-1.14.7/lib/i18n/exceptions.rb:3: warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
Run options: -v --seed 59183 -n "/test_(app_update_preserves_skip_action_mailbox|application_new_show_help_message_inside_existing_rails_directory)/"

# Running:

AppGeneratorTest#test_app_update_preserves_skip_action_mailbox = 1.13 s = .
AppGeneratorTest#test_application_new_show_help_message_inside_existing_rails_directory = /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git/git_proxy.rb:367:in 'Bundler::Source::Git::GitProxy#allowed_with_path': The git source https://github.com/rack/rack.git is not yet checked out. Please run `bundle install` before trying to start your application (Bundler::GitError)
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git/git_proxy.rb:78:in 'Bundler::Source::Git::GitProxy#revision'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git.rb:253:in 'Bundler::Source::Git#revision'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git.rb:130:in 'Bundler::Source::Git#install_path'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/path.rb:125:in 'Bundler::Source::Path#expanded_path'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/path.rb:162:in 'Bundler::Source::Path#load_spec_files'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git.rb:230:in 'Bundler::Source::Git#load_spec_files'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/path.rb:99:in 'Bundler::Source::Path#local_specs'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source/git.rb:198:in 'Bundler::Source::Git#specs'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source.rb:62:in 'Bundler::Source#spec_names'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source_map.rb:21:in 'block in Bundler::SourceMap#all_requirements'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source_map.rb:20:in 'Array#map'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/source_map.rb:20:in 'Bundler::SourceMap#all_requirements'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:1127:in 'Bundler::Definition#find_source_requirements'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:1103:in 'Bundler::Definition#source_requirements'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:1225:in 'Bundler::Definition#new_resolution_base'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:653:in 'Bundler::Definition#resolution_base'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:635:in 'Bundler::Definition#resolver'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:753:in 'Bundler::Definition#start_resolution'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:350:in 'Bundler::Definition#resolve'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:666:in 'Bundler::Definition#materialize'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:240:in 'Bundler::Definition#specs'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/definition.rb:312:in 'Bundler::Definition#specs_for'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/runtime.rb:18:in 'Bundler::Runtime#setup'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler.rb:165:in 'Bundler.setup'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/setup.rb:32:in 'block in <top (required)>'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/ui/shell.rb:177:in 'Bundler::UI::Shell#with_level'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/ui/shell.rb:122:in 'Bundler::UI::Shell#silence'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/bundler/setup.rb:32:in '<top (required)>'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/rubygems.rb:1454:in 'Kernel#require'
	from /home/yahonda/.local/share/mise/installs/ruby/trunk/lib/ruby/4.0.0+0/rubygems.rb:1454:in '<top (required)>'
	from <internal:gem_prelude>:2:in '<internal:gem_prelude>'
0.16 s = F


Failure:
AppGeneratorTest#test_application_new_show_help_message_inside_existing_rails_directory [test/generators/app_generator_test.rb:154]:
Expected /rails new APP_PATH \[options\]/ to match "".


bin/test test/generators/app_generator_test.rb:149


Finished in 1.284211s, 1.5574 runs/s, 3.1148 assertions/s.
2 runs, 4 assertions, 1 failures, 0 errors, 0 skips
$

System configuration

Rails version: main branch

Ruby version: ruby 4.0.0dev (2025-11-20T23:01:03Z master 010b23a7cf) +PRISM [x86_64-linux]
and later versions of Ruby master branch

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions