I had the exact same error. Here’s what you need to do.
1st, type this in your terminal:
curl -L https://get.rvm.io | bash -s stable
rvm install ruby-2.6
rvm use ruby-2.6
From this link: https://github.com/CocoaPods/CocoaPods/issues/9538
Let me know if this works
Thank you for reaching out, I was able to fix it. I appreciate the help
What was the solution??
Please share, this seems to be an issue many are encountering recently
Hello, sorry for the late reply. I found my solution at this link