Since version 17.0.0 upstream notes for the rubygems dependency:
A specific RubyGems version is not required, but you should
update to benefit from some known performance improvements.
With version 17.0.1 the gitlab ebuild changed the rubygems dependency
to =dev-ruby/rubygems-3.5* and you'll have to remove the package.mask
>dev-ruby/rubygems-3.4.15
we introduced in the "2023-08-28 [gitlab] rubygems masking" news
and add
=dev-ruby/rubygems-3.5* ~amd64
to the accepted keywords.