I am working on a flutter application, i am facing some issues over here, i tried one of the answers to solve using

sudo arch -x86_64 gem install ffi

but it didnt work. It still shows

  ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

    [!] Oh no, an error occurred.

    Search for existing GitHub issues similar to yours:

    If none exists, create a ticket, with the template displayed above, on:

    Be sure to first read the contributing guide for details on how to properly submit a ticket:

    Don't forget to anonymize any private data!

    Looking for related issues on cocoapods/cocoapods...

Error output from CocoaPods:
    Searching for inspections failed: undefined method `map' for nil:NilClass

Error running pod install
Error launching application on iPhone 13 Pro.