What does it mean and how can I fix it:
pod install /Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException) from /Library/Ruby/Site/2.0.0/rubygems.rb:278:in `activate_bin_path' from /usr/local/bin/pod:22:in `<main>'
To find if Cocoapods is installed or not run cmd (pod --version). if theresult is (Not Found) Pods is not installed.
Using following commands, it worked for me.
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin
cocoapods pod install
If you encounter this error on step 2
:
ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)
Then try this as step 2 instead (step 3 is not needed):
gem install -n /usr/local/bin cocoapods
If you install cocoapod using brew like me
Reinstall cocoapods:
brew reinstall cocoapods
If you see this error message after you reinstall cocoapods by brew reinstall
go to step 2.
> Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/pod Target /usr/local/bin/pod already exists. You may want to remove it: rm '/usr/local/bin/pod' To force the link and overwrite all conflicting files: brew link --overwrite cocoapods To list all files that would be deleted: brew link --overwrite --dry-run cocoapods Possible conflicting files are: /usr/local/bin/pod /usr/local/bin/xcodeproj
To solve conflicting files:
brew link --overwrite cocoapods
Linking /usr/local/Cellar/cocoapods/1.3.1... 2 symlinks created
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With