Cocoapods: LoadError - no such file to load

前端 未结 6 851
天命终不由人
天命终不由人 2020-12-30 00:59

I am trying to add a pod to my Xcode project. I am getting this error:

LoadError - no such file to load -- xcodeproj/prebuilt/universal-darwin13.0-1.8.7/

相关标签:
6条回答
  • 2020-12-30 01:43

    if you are using 10.10 and are seeing this error (/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:) try this

    Open Xcode 6 > Preferences > Locations
    Command Line Tools version to Xcode 6.0
    Uninstall cocoapods/xcodeproj then re-install.
    
    sudo gem uninstall cocoapods
    sudo gem uninstall xcodeproj
    sudo gem install xcodeproj
    sudo gem install cocoapods
    
    pod --version 
    
    0 讨论(0)
  • 2020-12-30 01:46

    Finally found a solution: I'm running old Xcode4 and new Xcode5 in same machine with same projects. At some point I seem to have lost command line tools (and iPhone5 simulator).

    Reinstalling command line tools solved the problem for me. Since Xcode 4.6.3 menu item Xcode - Preferences - Downloads - Components didn't have command-line tools any more for unknown reasons, here is another way to install them:

    xcode-select --install
    
    --install
              Opens a user interface dialog to request automatic installation of the
              command line developer tools.
    

    Now running "pod install" worked just fine.

    0 讨论(0)
  • 2020-12-30 01:50

    After upgrading from macOS 10.8 to 10.9 the installed CocoaPods gem doesn’t work anymore, even after re-installing the gem. To solve this, you might need to uninstall the gem first and then re-install.

    1. $ gem uninstall cocoapods
    2. $ gem install cocoapods
    0 讨论(0)
  • 2020-12-30 02:01

    I also was seeing this. Running this fixed the issue:

    sudo gem install cocoapods && pod install
    
    0 讨论(0)
  • 2020-12-30 02:01

    Files added in the pods but their reference is not considered until you run the command pod install. Just runt the bellow command:

    pod install

    0 讨论(0)
  • 2020-12-30 02:03

    As follow, this my problem: /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- Xcodeproj (LoadError)

    from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'

    from Script/ModuleDiscover.rb:9:in `'

    Just attempt many method, and it is no use , finnaly I resolve the problem just bellow:

    1、command + q,exit xcode

    2、open terminal and "open -a xcode". all fine

    0 讨论(0)
提交回复
热议问题