我正在按照https://github.com/invertase/react-native-firebase-starter
的“入门”部分建立一个新的本机Firebase项目。所有Android步骤都可以正常工作,但我正在努力使iOS吊舱能够正常工作(步骤1.4 [iOS] cd ios and run pod install
)
我已经安装了ruby,并使用gem来安装可可足类,例如:
gem install cocoapods
我接受了所有默认设置,并且安装成功,但是现在当我运行任何pod命令时,都会出现错误。
跑步pod --version
给我:
Traceback (most recent call last):
4: from C:/Ruby25-x64/bin/pod:23:in `<main>'
3: from C:/Ruby25-x64/bin/pod:23:in `load'
2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:47:in `run'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
我正在运行Windows 10 Pro
这里有一个堆栈溢出答案:https://stackoverflow.com/a/37451422/3368558,它通过注释掉支票而绕过了这个问题,但是我正在寻找一种更正确的方法,该方法不涉及我弄乱CocoaPods本身。