I tried updating cocoapods with "sudo gem install cocoapods" and it is stated that the latest cocoapods has been installed. However, when I run "pod --version", it still shows that the version is at my previous cocoapods version. Any suggestions on how to update to the latest version?
xx@xx-MacBook-Air ios % sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.11.3
Parsing documentation for cocoapods-1.11.3
Done installing documentation for cocoapods after 1 seconds
1 gem installed
xx@xx-MacBook-Air ios % pod setup
Setup completed
xx@xx-MacBook-Air ios % pod --version
1.10.1
I tried to uninstall cocoapods and reinstall it, following this suggestion with the following codes:
xx@xx-MacBook-Air ios % sudo gem uninstall cocoapods
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.11.3
xx@xx-MacBook-Air ios % pod --version
1.10.1
xx@x-MacBook-Air ios % sudo gem uninstall cocoapods
Gem 'cocoapods' is not installed
xx@xx-MacBook-Air okepos % sudo gem install cocoapods
Fetching cocoapods-1.11.3.gem
Successfully installed cocoapods-1.11.3
Parsing documentation for cocoapods-1.11.3
Installing ri documentation for cocoapods-1.11.3
Done installing documentation for cocoapods after 2 seconds
1 gem installed
xx@xx-MacBook-Air ios % pod --version
1.10.1
But even after I have uninstalled cocopods, the pod --version still shows the previous version. I tried re-installing the latest version again but the version still shows 1.10.1