If the message says you are missing a lib:
I got same problem and it was fixed after running pod setup and then pod install
If the missing directory is the ruby dir you can do:
You have probably updated your osx or ruby gem recently and its PATH is still linking to the old ruby version. Fix with:
sudo gem install -n /usr/local/bin ruby
sudo gem install -n /usr/local/bin cocoapods
As said by @rendel