cocoapods-keys: Cocoapods-keys doesn't work after upgrading to macOS Catalina
I realise using beta software means these sort of issues will come up and generally unsupported; however I am hoping someone can assist me? (maybe its something simple 👍 )
My issue is almost identical to #143
My output is as follows:
---------------------------------------------
Error loading the plugin `cocoapods-keys-2.1.0`.
SystemExit - ERROR: Can't find header dir for ruby. Exiting...
/Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:564:in `abort'
/Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:564:in `build'
/Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:856:in `inline'
/Users/robert/.gems/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:17:in `<class:OSXKeychain>'
/Users/robert/.gems/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:6:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/robert/.gem/ruby/2.6.0/gems/cocoapods-keys-2.1.0/lib/keyring.rb:1:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/robert/.gem/ruby/2.6.0/gems/cocoapods-keys-2.1.0/lib/cocoapods_plugin.rb:1:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `block in safe_activate_and_require'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `each'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `safe_activate_and_require'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `map'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:326:in `block in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `each'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run'
/Users/robert/.gems/gems/cocoapods-1.7.2/lib/cocoapods/command.rb:52:in `run'
/Users/robert/.gems/gems/cocoapods-1.7.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
---------------------------------------------
[!] Your Podfile requires that the plugin `cocoapods-keys` be installed. Please install it and try installation again.
I have tried:
gem install cocoapods-keys --user-install- Upgrading and reinstalling Ruby (On version 2.6.3)
- Sudo gem install cocoapods-keys`
However nothing seems to work.
I would really appreciate it if someone can point me in the right direction!
Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 19
@ashfurrow - Sorry, I should have elaborated on how I fixed this. 😃
I did the following in terminal:
brew install rbenv ruby-build~/.zshrc(Or bash if you’re using that)if which rbenv > /dev/null; then eval "$(rbenv init -)"; fiat the end of the file.$ source ~/.zshrcThen ran the following commands:
rbenv install 2.6.3rbenv global 2.6.3ruby -v- to check it updatedNow most importantly do:
which gemIf it doesnt report/Users/<youruser>/.rbenv/shims/gemthen restart your terminal.If all goes to plan next run
gem install cocoapods-keysRemember not to use
sudoon the gem install.Now run
pod install- and it should go through without errors.I really appreciate the way @RJ-Clegg explained in a detailed way to fix the issue of cocoapods-keys.
But for those who have failed to get the value of path as mentioned here, even after restarting terminal:-
Solution
Do the following -
Pre-Steps A.
gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall-> remove all existing cocoapod installation B.sudo gem uninstall -aIx-> remove the existing gem installation from local macNow, follow as mentioned in the above by @RJ-Clegg , with some custom steps:-
brew install rbenv ruby-buildtouch ~/.zshrc--> To make sure file is createdopen ~/.zshrc--> Open the fileif which rbenv > /dev/null; then eval "$(rbenv init -)"; fiat the end of file.source ~/.zshrc-> to add it in the shellrbenv install 2.6.3rbenv global 2.6.3ruby -v--> to check it’s updatedwhich gemIt will surely show/Users/<youruser>/.rbenv/shims/gemsudo gem install -n /usr/local/bin cocoapodspod setupcocoapod-keygem install cocoapods-keysThat’s it, now
cocoapods-keywill not show error in case of pod install or update 🥳thank u man, i’ve spend 30 minutes for this problem and u helped me
Very helpful!!! Thanks a lot, saved lots of time!👌👍
NOTE FOR MacOS Big Sur Users: In order for the above to work, you need to have the LATEST version of XCode. (In my Case 12.2)
in case you dont have have permission try this export GEM_HOME=“$HOME/.gem”