几个月前我在开发一个React原生应用程序,我刚刚恢复了工作,但pod安装出现了问题。同时,我在暂停的时候一直在开发其他项目,pod安装工作正常,所以这表明这不是环境问题。
我得到的错误如下:
Ignoring json-2.6.3 because its extensions are not built. Try: gem pristine json --
version 2.6.3
<internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require': dlopen(/Users/plafferty/.gem/ruby/2.7.6/gems/date-3.3.3/lib/date_core.bundle, 0x0009): symbol not found in flat namespace '_rb_empty_keyword_given_p' - /Users/plafferty/.gem/ruby/2.7.6/gems/date-3.3.3/lib/date_core.bundle (LoadError)
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /Users/plafferty/.gem/ruby/2.7.6/gems/date-3.3.3/lib/date.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/time.rb:4:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/gems/activesupport-6.1.7/lib/active_support/xml_mini.rb:3:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/gems/activesupport-6.1.7/lib/active_support/core_ext/array/conversions.rb:3:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/gems/cocoapods-1.11.3/lib/cocoapods.rb:9:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/gems/cocoapods-1.11.3/bin/pod:36:in `<top (required)>'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/bin/pod:25:in `load'
from /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/bin/pod:25:in `<main>'
任何帮助或建议将不胜感激。
1条答案
按热度按时间58wvjzkj1#
我自己设法找到了解决方案。我不完全理解为什么它对一些项目有效而对另一些项目无效--也许你们中的一个可以补充一下。
简而言之,我确保我的系统中只安装了一个Ruby版本。有多个2版本相互冲突,没有虚拟控件来管理活动版本。