What exactly did you try? As for me I decided don't use ruby and gems from ports. They done it strange in ports. For instance ruby-gems is separate port from ruby-3.1.0 and has lower version when gems included into ruby-3.1.0. And as consequence after installing lang/ruby31 I can't install some gems because they requires a gem from ruby 3.1.0. So I decided to use devel/rbenv and ruby-build from github, because devel/ruby-build is outdated.