cocoapods not installing
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 successfullyThe formula built, but is not symlinked into /usr/localCould not symlink bin/podTarget /usr/local/bin/podalready exists. You may want to remove it: rm '/usr/local/bin/pod'To force the link and overwrite all conflicting files: brew link --overwrite cocoapodsTo list all files that would be deleted: brew link --overwrite --dry-run cocoapodsPossible 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
Hope it helps.