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)