Note: The command above will uninstall all gems from the default gem path. If you have gems installed in other locations, you may need to handle those manually.
After performing the steps above, you should be able to install and use CocoaPods without encountering the “ffi” error on macOS Catalina.