Open terminal and type:
$ sudo gem update cocoapods
Remove all the pods from your project (tricky part):
Manually
Automatically using CocoaPods De-Integrate
Install
$ [sudo] gem install cocoapods-deintegrate
Run
$ pod deintegrate
Here we are going through at installing the Pods again
Change your location your directory
$ cd yourprojectdirectory
Edit podfile by adding lines you need to it
$ open -a Xcode podfile
or
$ nano podfile
FINALLY install the pod again
$ pod install
Hope this helps