You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to prepare minimal and self contained Ruby RPM package. Therefore I chose to configure Ruby using --with-sitedir=no --with-vendordir=no configuration options. And now I am facing test suite errors such as:
111) Error:
TestGemCommandsSetupCommand#test_execute_regenerate_binstubs:
Errno::ENOENT: No such file or directory @ dir_chdir0 - $(sitedir)/ruby3.3/rubygems
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:465:in `chdir'
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:465:in `files_in'
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:509:in `block in remove_old_lib_files'
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:506:in `each'
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:506:in `remove_old_lib_files'
/builddir/build/BUILD/ruby-3.3.0/lib/rubygems/commands/setup_command.rb:170:in `execute'
/builddir/build/BUILD/ruby-3.3.0/test/rubygems/test_gem_commands_setup_command.rb:68:in `test_execute_regenerate_binstubs'
If I understand correctly, the $(sitedir) actually comes from here:
In normal situation, with the default site dir configuration, the RbConfig::CONFIG[site_or_vendor] would be expanded into proper path. However, with disabled site dir, the RbConfig does not have value for the sitedir, therefore the $(sitedir) is kept. It seems that the Ruby's rbinstall.rb script handles this scenario:
IOW, I don't think this is just test suite error. The test suite error correctly points out that there might be user scenario, which is not correctly handled (is it trying to update RubyGems via gem update?). If this is valid Ruby configuration, I believe that RubyGems should properly handle this situation (even if "properly" was just reporting that there is no location for updated RubyGems).
The text was updated successfully, but these errors were encountered:
There actually are small traces of handling the missing vendor dir. That means also JRuby might struggle to pass these test cases and indeed, the whole test file is just disabled:
I am trying to prepare minimal and self contained Ruby RPM package. Therefore I chose to configure Ruby using
--with-sitedir=no --with-vendordir=no
configuration options. And now I am facing test suite errors such as:If I understand correctly, the
$(sitedir)
actually comes from here:rubygems/lib/rubygems/commands/setup_command.rb
Lines 449 to 462 in 4198033
In normal situation, with the default site dir configuration, the
RbConfig::CONFIG[site_or_vendor]
would be expanded into proper path. However, with disabled site dir, theRbConfig
does not have value for thesitedir
, therefore the$(sitedir)
is kept. It seems that the Ruby'srbinstall.rb
script handles this scenario:https://github.com/ruby/ruby/blob/a846d391d38b34fcc4f90adef967c166c923bd56/tool/rbinstall.rb#L354-L361
IOW, I don't think this is just test suite error. The test suite error correctly points out that there might be user scenario, which is not correctly handled (is it trying to update RubyGems via
gem update
?). If this is valid Ruby configuration, I believe that RubyGems should properly handle this situation (even if "properly" was just reporting that there is no location for updated RubyGems).The text was updated successfully, but these errors were encountered: