错误:执行 gem 时...(Gem::Exception)无法找到 gems ["ffi"] = 1.15.0

Chr*_*ter 8 rubygems ruby-on-rails firebase visual-studio-code flutter

我被困在这个问题上,迫切需要帮助!我正在 Visual Studio Code 中构建一个使用 Firebase 的 Flutter 应用程序。我将以下依赖项添加到我的pubspec.yaml文件中:

\n
firebase_core: ^1.11.0\nfirebase_analytics: ^9.0.5\nfirebase_auth: ^3.3.5\ncloud_firestore: ^3.1.6\n
Run Code Online (Sandbox Code Playgroud)\n

我的应用程序将单个文本行写入 Firebase 并随后立即读取它(只是一个测试应用程序,用于查看事情如何工作/学习 API)。我在 iOS 模拟器上运行该应用程序,并在调试控制台中得到一堆输出,但底部的错误如下:

\n
Error output from CocoaPods:\n\xe2\x86\xb3\n76\n\nIgnoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0\nError running pod install\nError launching application on iPhone 12 Pro.\nExited (sigterm)\n
Run Code Online (Sandbox Code Playgroud)\n

gem pristine ffi --version 1.15.0我已在终端中运行命令并收到权限警告。我完成了此处的步骤并安装了 Homebrew,rbenv并遵循了所有这些步骤,因此不需要该部分的帮助。

\n

我跑了brew install cocoapodsgem install bundler并且(这里gem install ffi推荐)。我一直在无数不同的论坛中按照步骤转圈,但应用程序始终无法启动,并且调试控制台不断输出:

\n
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0\n
Run Code Online (Sandbox Code Playgroud)\n

当我在终端中运行它时,我不断收到:

\n
ERROR:  While executing gem ... (Gem::Exception)\n    Failed to find gems ["ffi"] = 1.15.0\n
Run Code Online (Sandbox Code Playgroud)\n