While trying to do "pod install" in react-native project , I am getting below error:

/Users/admin/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn\_source.rb:342:in `download_file_async': undefined method` encode' for URI:Module (NoMethodError)

Cocoapods - 1.9.3
Ruby - 3.0.0
OSX - 11.5
Xcode - 12.2