this happens if your gem version is < 3.1.0
it has been fixed in rubygems 3.1.0
note that as it is a self-updating binary, the way to update it is with
gem update --system
to check your version use
gem -v
This is a known-issue has been fixed in Gem version 3.1.0
if you have gem < 3.1.0 and for some reason, you can't update, there is no work-around. The counter-intuitive thing here is that for the gem push with OTP, if you fail to specify an OTP you get a little interactive OTP input on the command line. Confusingly, if you suffer from this problem, gem yank tells you you didn't supply an OTP and also tells you that --otp
isn't a valid option.