I recently updated to ruby v 2.6 After upgrading I'm facing issue installing pods with the following error
Traceback (most recent call last):
7: from /usr/local/bin/pod:23:in `<main>'
6: from /usr/local/bin/pod:23:in `load'
5: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:2:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
8: from /usr/local/bin/pod:23:in `<main>'
7: from /usr/local/bin/pod:23:in `load'
6: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:2:in `<top (required)>'
2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require': cannot load such file -- xcodeproj (LoadError)
解决方案-找个好点网路,执行如下:
sudo gem install cocoapods