Reputation: 469
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)
I have tried sudo gem install cocoapods
but with no help.
Anyone facing similar issue and found a solution?
Upvotes: 17
Views: 21007
Reputation: 1
I was facing it when I was installing Flutter Firebase CLI from a YouTube Video, It is solved in that video and it is simple
sudo gem install xcodeproj
Upvotes: 0
Reputation: 1
The problem I had with this error was that my computer had outdated ruby, which was updated with a ruby version manager (rbenv
) by running the following commands:
rbenv install 3.2.0
rbenv global 3.2.0
Once ruby was updated to the most recent version, my computer still had the problem and the problem was that it had an older version, this was because of the permissions that rbenv
did not have and the PC continued using the old version, for this I applied the command
sudo chown -R $(whoami) ~/.rbenv
and reinstalled again by running the commands:
gem install ffi
gem install cocoapods
After this all the problems were solved.
Upvotes: 0
Reputation: 813
Only this worked for me:
sudo gem install cocoapods --user-install
Upvotes: 6
Reputation: 551
Seems like you need install gem xcodeproj, run in terminal :
gem install xcodeproj
Upvotes: 45
Reputation: 2402
This happened to me when after doing a tns migrate
on NativeScript 6.5, and I had been building fine before the command was run.
I fixed this by running tns doctor
which said my cocoapods install was missing. So the tns doctor went into reinstall mode automatically to try and fix the problem, and I let it reinstall cocoapods and xcodeproj.
Upvotes: 0
Reputation: 11
Install RVM with \curl -sSL https://get.rvm.io | bash -s stable; restart your shell; install Ruby with rvm install 2.6.
gem install cocoa pods
pod install
this worked for me
Upvotes: 0