Summary: | dev-ruby/rubygems-3.1.2: cannot load such file -- rubygems/compatibility (LoadError) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stoian Ivanov <sdr> |
Component: | Current packages | Assignee: | Gentoo Ruby Team <ruby> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esavier, kilgorephotoshop, leonchik1976, marduk, sam, sfl |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
gubygems build log .. ends in success
dev-ruby/minitest build log with failure post rubygems reinstall |
Description
Stoian Ivanov
2020-01-13 11:14:55 UTC
(In reply to Stoian Ivanov from comment #0) > make[1]: Entering directory > '/slow/tmp_portage/dev-lang/ruby-2.6.5/work/ruby-2.6.5' > *** Following extensions are not compiled: > win32ole: > Could not be configured. It will not be installed. > Check ext/win32ole/mkmf.log for more details. > win32: > Could not be configured. It will not be installed. > Check ext/win32/mkmf.log for more details. > win32/resolv: > Skipped because its parent was not configured. These are warnings and can be ignored. We are not building on win32. > >>> Install dev-ruby/did_you_mean-1.4.0 into /var/tmp/portage/dev-ruby/did_you_mean-1.4.0/image > * Running install phase for ruby26 ... > Traceback (most recent call last): > 3: from <internal:gem_prelude>:2:in `<internal:gem_prelude>' > 2: from <internal:gem_prelude>:2:in `require' > 1: from /usr/lib64/ruby/2.6.0/rubygems.rb:16:in `<top (required)>' > /usr/lib64/ruby/2.6.0/rubygems.rb:16:in `require': cannot load such file -- > rubygems/compatibility (LoadError) It looks like rubygems-3.1.2 did not properly install. Please try re-installing, and if that does not fix the issue please include the complete build.log. Created attachment 603250 [details]
gubygems build log .. ends in success
Created attachment 603252 [details]
dev-ruby/minitest build log with failure post rubygems reinstall
OMG! noah /var/tmp/portage # equery files rubygems * Searching for rubygems ... * Contents of dev-ruby/rubygems-3.1.2: /auto_gem.rb /rubygems /rubygems.rb /rubygems/available_set.rb /rubygems/basic_specification.rb /rubygems/bundler_version_finder.rb /rubygems/command.rb /rubygems/command_manager.rb /rubygems/commands /rubygems/commands/build_command.rb /rubygems/commands/cert_command.rb /rubygems/commands/check_command.rb /rubygems/commands/cleanup_command.rb /rubygems/commands/contents_command.rb /rubygems/commands/dependency_command.rb /rubygems/commands/environment_command.rb /rubygems/commands/fetch_command.rb /rubygems/commands/generate_index_command.rb /rubygems/commands/help_command.rb /rubygems/commands/info_command.rb /rubygems/commands/install_command.rb /rubygems/commands/list_command.rb /rubygems/commands/lock_command.rb /rubygems/commands/mirror_command.rb /rubygems/commands/open_command.rb /rubygems/commands/outdated_command.rb /rubygems/commands/owner_command.rb /rubygems/commands/pristine_command.rb /rubygems/commands/push_command.rb /rubygems/commands/query_command.rb ========================= noah /var/tmp/portage # ll -d /r* drwx------ 32 root root 4.0K 14 яну 08:37 /root drwxr-xr-x 14 root root 4.0K 14 яну 09:13 /rubygems -rw-r--r-- 1 root root 37K 14 яну 09:13 /rubygems.rb drwxr-xr-x 23 root root 820 13 яну 10:13 /run noah /var/tmp/portage # It looks like rubygems are installed under /rubygems becasue ruby_rbconfig_value() failed to return the proper path: $ sudo RUBY_TARGETS=ruby27 ebuild rubygems-3.2.14.ebuild clean install * rubygems-3.2.14.tgz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking rubygems-3.2.14.tgz to /dev/shm/portage/dev-ruby/rubygems-3.2.14/work/all >>> Source unpacked in /dev/shm/portage/dev-ruby/rubygems-3.2.14/work >>> Preparing source in /dev/shm/portage/dev-ruby/rubygems-3.2.14/work ... * Running prepare phase for all ... * Running prepare phase for all ... * Adjusting to prefix / * operating_system.rb ... [ ok ] * Running source copy phase for ruby27 ... >>> Source prepared. >>> Configuring source in /dev/shm/portage/dev-ruby/rubygems-3.2.14/work ... >>> Source configured. >>> Compiling source in /dev/shm/portage/dev-ruby/rubygems-3.2.14/work ... * Running compile phase for ruby27 ... >>> Source compiled. * Skipping make test/check due to ebuild restriction. >>> Test phase [disabled because of RESTRICT=test]: dev-ruby/rubygems-3.2.14 >>> Install dev-ruby/rubygems-3.2.14 into /dev/shm/portage/dev-ruby/rubygems-3.2.14/image * Running install phase for ruby27 ... +++ /usr/bin/ruby27 -rrbconfig -e 'puts RbConfig::CONFIG['\''sitelibdir'\'']' Traceback (most recent call last): 2: from <internal:gem_prelude>:2:in `<internal:gem_prelude>' 1: from /dev/shm/portage/dev-ruby/rubygems-3.2.14/work/ruby27/rubygems-3.2.14/lib/rubygems/core_ext/kernel_require.rb:85:in `require' /dev/shm/portage/dev-ruby/rubygems-3.2.14/work/ruby27/rubygems-3.2.14/lib/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such fil e -- did_you_mean (LoadError) In comparison, ruby26, ruby30 do not break without did_you_mean. ruby26: * Running install phase for ruby26 ... +++ /usr/bin/ruby26 -rrbconfig -e 'puts RbConfig::CONFIG['\''sitelibdir'\'']' ++ echo /usr/lib64/ruby/site_ruby/2.6.0 ++ set +x +++ /usr/bin/ruby26 -rrbconfig -e 'puts RbConfig::CONFIG['\''sitelibdir'\'']' ++ echo /usr/lib64/ruby/site_ruby/2.6.0 ++ set +x ruby30: * Running install phase for ruby30 ... +++ /usr/bin/ruby30 -rrbconfig -e 'puts RbConfig::CONFIG['\''sitelibdir'\'']' `did_you_mean' was not loaded. ++ echo /usr/lib64/ruby/site_ruby/3.0.0 ++ set +x +++ /usr/bin/ruby30 -rrbconfig -e 'puts RbConfig::CONFIG['\''sitelibdir'\'']' `did_you_mean' was not loaded. ++ echo /usr/lib64/ruby/site_ruby/3.0.0 ++ set +x We can workaround this issue by adding "--disable=did_you_mean" to the ruby command in ruby_rbconfig_value(). Also, adding the flag in ruby_fakegem_metadata_gemspec() will make dev-ruby/did_you_mean installable. Then, other ruby packages can be installable. I think we don't have much benefit of having did_you_mean in the eclass commands. So, we can add the flag. *** Bug 782763 has been marked as a duplicate of this bug. *** While the bypass is workign for did_you_mean, dev-ruby/minitest-5.14.4 is still failing. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=892a0a3a11b97935242d37629d6086af8485ef0f commit 892a0a3a11b97935242d37629d6086af8485ef0f Author: Hans de Graaff <graaff@gentoo.org> AuthorDate: 2021-04-28 06:01:20 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2021-04-28 06:05:48 +0000 eclass/ruby-{ng,fakegem}.eclass: fix did_you_mean issues The default gem did_you_mean was unbundled in 2e225cca1aa95b8a5e54cbd855f17dbaf88940d9 to fix bug 758464. Unfortunately ruby 2.7 fails when did_you_mean is not present at all, making it impossible to install this ruby version. 2.6 and 3.0 are not affected by this. With this change we explicitly disable the did_you_mean gem when invoking ruby in the eclasses. Thanks to naota for diagnosing the issue and coming up with a solution. Closes: https://bugs.gentoo.org/705346 Signed-off-by: Hans de Graaff <graaff@gentoo.org> eclass/ruby-fakegem.eclass | 4 ++-- eclass/ruby-ng.eclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (In reply to Naohiro Aota from comment #5) > We can workaround this issue by adding "--disable=did_you_mean" to the ruby > command in ruby_rbconfig_value(). Also, adding the flag in > ruby_fakegem_metadata_gemspec() will make dev-ruby/did_you_mean installable. > Then, other ruby packages can be installable. > > I think we don't have much benefit of having did_you_mean in the eclass > commands. So, we can add the flag. Thanks for figuring this out and providing a fix! Next time, please feel free to commit it, especially if I don't respond within a couple of days. (In reply to Mateusz Matejuk from comment #7) > While the bypass is workign for did_you_mean, dev-ruby/minitest-5.14.4 is > still failing. With this fix in place I can successfully bootstrap ruby 2.7 in a clean install. Please reopen if this is still causing issues. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6aa0fc2dcee195658e697026e607dbb91bfd31d commit f6aa0fc2dcee195658e697026e607dbb91bfd31d Author: Hans de Graaff <graaff@gentoo.org> AuthorDate: 2021-04-28 17:25:42 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2021-04-28 17:26:03 +0000 dev-lang/ruby: backport ruby 3.0 gem_prelude.rb The ruby26 and ruby30 gem_prelude.rb fails gracefully when the did_you_mean gem cannot be loaded. Backport the ruby30 version since it is more modular. This helps with cases where the did_you_mean gem is not yet installed as part of a fresh ruby install. Bug: https://bugs.gentoo.org/705346 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Hans de Graaff <graaff@gentoo.org> dev-lang/ruby/files/2.7/003-did-you-mean.patch | 16 ++ dev-lang/ruby/ruby-2.7.3-r1.ebuild | 263 +++++++++++++++++++++++++ 2 files changed, 279 insertions(+) |