I'm trying to include Alamofire in my Swift project following the github(https://github.com/Alamofire/Alamofire#cocoapods) instruction.
I've created a new project, navigated to the project directory and run  this command sudo gem install cocoapods. Then I faced following error:
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/pod
After searching I managed to install cocoapods by running this command sudo gem install -n /usr/local/bin cocoapods 
Now I generate a pod file by pod init and edited it this way:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectName' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  # Pods for Law
    pod 'Alamofire'
  target 'ProjectNameTests' do
    inherit! :search_paths
    # Pods for testing
  end
  target 'ProjectNameUITests' do
    inherit! :search_paths
    # Pods for testing
  end
end
Finally I run pod install to install Alamofire. After that I open the project and import Alamofire statement gives me following error No such module 'Alamofire'
Update-1: Results of pod install is:
Analyzing dependencies
Downloading dependencies
Using Alamofire (3.4.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
 
     
    
 
     
     
     
     
     
     
     
    