【问题标题】:`rescue in block in activate_dependencies': Could not find 'rexml' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)`rescue in block in activate_dependencies\': Could not find \'rexml\' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)
【发布时间】:2022-12-19 04:52:23
【问题描述】:

Having an issue when running pod install in my ReactNative iOS application, as the build fails when trying to run the emulator. These are the two errors that occur when doing so. Running this locally on a 2021 M1 Macbook Pro, and it is my first time attempting to build a ReactNative application, and setting up the development environment, so any help in pointing me in the right direction is appreciated. If you need any additional info, please let me know and I'll do my best to provide it ASAP.

`rescue in block in activate_dependencies': Could not find 'rexml' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/craigsau/.rvm/gems/ruby-2.7.5:/Users/craigsau/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec' at: /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/specifications/CFPropertyList-3.0.5.gemspec, execute `gem env` for more information
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1398:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:286:in `block in activate_bin_path'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `synchronize'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `activate_bin_path'
    from /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
Could not find 'rexml' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/craigsau/.rvm/gems/ruby-2.7.5:/Users/craigsau/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec' , execute `gem env` for more information
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1399:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:286:in `block in activate_bin_path'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `synchronize'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `activate_bin_path'
    from /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'

attempted running the commands gem install bundler gem update --system but still giving the same errors when trying to run the pod install command in order to fix the build when trying to run the ReactNative template through an emulator.

【问题讨论】:

  • I am having same issue, any luck fixing this?

标签: ios react-native


【解决方案1】:

run the following command

gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods
cd ios
pod install --repo-update

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-23
    • 2021-09-19
    • 1970-01-01
    • 1970-01-01
    • 2022-07-26
    • 1970-01-01
    • 2018-10-14
    • 1970-01-01
    相关资源
    最近更新 更多