I'm getting the following issue while running a flutter project on a M1 Mac.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core
_ext/kernel_require.rb:54:in `require': cannot load such file -- 2.6/ffi_c (LoadError)
I have tried uninstalling and installing the ffi gem as suggested in the Flutter docs. The issue is still showing.
Found a workaround, still need to investigate if this is the appropriate solution. Run the following in your terminal to install the x86 gem.
arch -x86_64 sudo gem install ffi