Solução de dependência no iDiário 1.6.0

Problema 01: Como resolver esse erro na instalação do bundler… Resolving dependencies…
net-imap-0.5.5 requires ruby version >= 3.1.0, which is incompatible with the current version, ruby 2.6.6p146

Problema 02: ffi-1.17.0-x86_64-linux-musl requires rubygems version >= 3.3.22, which is incompatible with the current version, 3.0.9:q

Solução: gem install rubygems-update -v 3.3.22 && gem update --system