Can't find gem hiera-eyaml (>= 0.a)

/usr/lib/ruby/vendor_ruby/rubygems.rb:281:in find_spec_for_exe': can't find gem hiera-eyaml (>= 0.a) with executable eyaml (Gem::GemNotFoundException) from /usr/lib/ruby/vendor_ruby/rubygems.rb:300:in activate_bin_path’
from /usr/local/bin/eyaml:23:in `’

I am getting this issue after i had upgraded the server and ruby is updated with 2.7 now…
Can someone help in fixing…i tried gem update --system but got an error
ERROR: Your RubyGems was installed trough APT, and upgrading it through RubyGems
itself is unsupported. If you really need the latest version of RubyGems (tip:
you usually don’t), then you need to install RubyGems (and Ruby) manually,
maybe using tools like ruby-install, rvm, etc.