After upgrading 10.10 Yosemite, cocoapods encountered an error (solution)

Source: Internet
Author: User
Tags install cocoapods
RSMacBook-Pro:~ RS$ pod search jsonkit/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘: cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>‘    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods.rb:2:in `<top (required)>‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:32:in `<top (required)>‘    from /usr/bin/pod:23:in `load‘    from /usr/bin/pod:23:in `<main>‘

I always wanted to try a new system. I was worried about bugs which could lead to a series of problems during development. I had been holding on to the problem. I had to upgrade the system two days ago and immediately encountered this problem.

Cocoapods cannot be operated. There is a solution on stackoverflow, Which is reprinted by many people. Unfortunately, didn't work for me. So I tried to reinstall Ruby and solved it.

Solution 1: (applicable to most people)

Open xcode 6 open xcode 6 -- system preference settings -- location -- change the command line tool to xcode 6.0

Uninstall cocoapods -- reinstall xcodeproj -- reinstall cocoapods

$ Sudo gem uninstall cocoapods

$ Sudo gem install xcodeproj

$ Sudo gem install cocoapods
If no problem exists, run pod -- version to check whether the installation is successful.

If, unfortunately, the above operations cannot be solved, it will be the same as the landlord

1. Update rbenv

$ Curl-l get. rvm. Io | bash-s stable

2. reinstall Ruby

$ Rvm install Ruby 2.1.1

3. reinstall cocoapods

$ Sudo gem install cocoapods

After upgrading 10.10 Yosemite, cocoapods encountered an error (solution)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.