Error installing cocoapods: drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210
if you are using macOS, How about using homebrew than gem? I had exactly same problem, so I tried to install it using homebrew brew install cocoapods My problem was clearly resolved!