Updated : can’t find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)

Nandhu_writes
2 min readOct 26, 2023

--

means that CocoaPods is not installed on your system, or that it is installed but not in the PATH variable.

Issue:

.rvm/rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems.rb:264:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)

Solution:

//make sure cocoapod is installed, if not
sudo gem install cocoapods

gem pristine --all

//if perm err occurs While executing gem ... (Errno::EACCES) use super user
bundle i or bundle install

Note :

Comment “FIXED” is this solution helps you well

Try deleting the ~/.cocoapods directory and reinstalling CocoaPods. This will remove all of your CocoaPods settings and configurations, so make sure that you have backed up any important data before doing this.

Make sure that you are using the latest version of CocoaPods.

Feel free to respond with your fixes in the comments

Update 2024 Feb:

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/bin/pod:23:in `<main>'

Unknown ruby interpreter version (do not know how to handle): >=2.6.10.


nano ~/.bash_profile
source ~/.bash_profile
# add the below paths in bash_profile
# RVM can encounter errors if it's not the last thing in .bash_profile
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to path for scripting (to manage Ruby versions)
export PATH="$GEM_HOME/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

--

--

Nandhu_writes

React Native developer | Still a learner | blogger : Tech life lessons || Buy me a coffee, and I'll write : https://www.buymeacoffee.com/infoappmakk