Normally we use
sudo gem install cocoapods sudo gem install cocoapods Solution, fix for CocoaPods error on Mac OS X v10.11 (El Capitan):
sudo gem install -n /usr/local/bin cocoapods pod setup cd /project path pod init sudo gem install -n /usr/local/bin cocoapods pod setup cd /project path pod init In Podfile we need to set the target
# Podfile platform :ios, '9.0' use_frameworks! # My other pods target “Projectname” do pod 'MBProgressHUD', '~> 0.8' pod 'Reachability', '~> 3.1.1' pod 'AFNetworking', '~> 2.2' pod 'TPKeyboardAvoiding', '~> 1.2' end target 'ProjectnameTests' do testing_pods end target 'ProjectnameUITests' do testing_pods end # Podfile platform :ios, '9.0' use_frameworks! # My other pods target “Projectname” do pod 'MBProgressHUD', '~> 0.8' pod 'Reachability', '~> 3.1.1' pod 'AFNetworking', '~> 2.2' pod 'TPKeyboardAvoiding', '~> 1.2' end target 'ProjectnameTests' do testing_pods end target 'ProjectnameUITests' do testing_pods end In the console - terminal
pod install pod install