LoadError: cannot load such file -- rdoc
Using latest Gitlab version 16.5.0 I get the following error in the logs when starting gitlab using OpenRC and when running the diagnostics using sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
:
LoadError: cannot load such file -- rdoc
This seems to be related to https://gitlab.com/gitlab-org/gitlab/-/issues/427138
Passing RUBYLIB
env variable to the diagnostics like this sudo -u git -H RUBYLIB="/usr/lib64/ruby/gems/3.1.0/gems/rdoc-6.5.0/lib/" bundle exec rake gitlab:env:info RAILS_ENV=production
fixes the problem.
Unfortunately I could not figure out how to fix this for running gitlab.