How to make a CocoaPods project work on OS X El Capitan & Xcode 7 Beta?

It worked for me for the bug when run Cocoapods on El Capitan 10.11 following this guide:

export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

gem install cocoapods

Until Cocoapods supports Swift 2, at the very least you should be able to continue to use Xcode 6 until it does. If Xcode 7 has stomped all over your Cocoapods already, this link shows you how to clean it up https://gist.github.com/mbinna/4202236.

Basically, from inside any project using Cocoapods:

rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update

Then rebuild using Xcode 6 and everything should be back to normal.