• 使用cocoapods出现某些错误


    在更新cocoapods时,出现错误,找了半天终于在stackoverflow上找到答案:

    /Users/myusername/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoa pods' (>= 0) among 37 total gem(s) (Gem::LoadErrorfrom

    /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'from

    /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem from

    /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'

     答案:

    Do not use sudo gem install cocoapods if you have rvm installed. It creates a few problems. Follow these steps to fix your cocoapods installation:

    1. Uninstall Cocoapods:

      sudo gem uninstall cocoapods
    2. Make sure you're on the latest Ruby:

      which ruby
    3. Install cocoapods without sudo:

      gem install cocoapods -V --no-ri --no-rdoc
      # V: Verbose; no-ri,no-rdoc: Do not install documentation
    4. Set up Cocoapods:

      pod setup

    Should work now.

    原来是我以前安装是用了sudo,导致位置不对

    重新设置一下就行了。

  • 相关阅读:
    《SeleniumBasic 3.141.0.0
    《SeleniumBasic 3.141.0.0
    《SeleniumBasic 3.141.0.0
    MQ详解及四大MQ对比
    Locust的使用
    pytest测试框进阶(二)
    pytest测试框进阶(一)
    pytest测试框架简介(二)
    pytest测试框架简介(一)
    弱网测试简介
  • 原文地址:https://www.cnblogs.com/kw-ios/p/3831301.html
Copyright © 2020-2023  润新知