title: Can't find libpq.h header when installing AFNetworking using cocoapods
body: <p>I already have various pods working perfectly with my Xcode project. I now tried to install AFNetworking pod by modifying the podfile. This is my new podfile</p>
  
  <pre><code>platform : ios '7.0'
  
  pod 'MKNetworkKit'
  pod 'SBJson', '~&gt; 4.0.0'
  pod 'MBProgressHUD'
  pod 'STTweetLabel'
  pod 'AFNetworking'
  </code></pre>
  
  <p>However when I run the command</p>
  
  <pre><code>pod update
  </code></pre>
  
  <p>It throws me this problem</p>
  
  <pre><code>/Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
  
  /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb 
  checking for pg_config... no
  No pg_config... trying anyway. If building fails, please try again with
  --with-pg-config=/path/to/pg_config
  checking for libpq-fe.h... no
  Can't find the 'libpq-fe.h header
  
  extconf failed, exit code 1
  
  Gem files will remain installed in /Users/fernandolizana/.rvm/gems/ruby-2.1.1/gems/pg-0.17.1 for inspection.
  Results logged to /Users/fernandolizana/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/pg-0.17.1/gem_make.out
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/tempfile.rb:324:in `open'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:1436:in `block in build_extensions'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/user_interaction.rb:45:in `use_ui'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:1434:in `build_extensions'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/stub_specification.rb:60:in `build_extensions'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:924:in `each'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find_inactive_by_path'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems.rb:185:in `try_activate'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
  from /Users/fernandolizana/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1@global/gems/rubygems-bundler-1.4.3/lib/rubygems_executable_plugin.rb:4:in `block in &lt;top (required)&gt;'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `call'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `block in run'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `each'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `run'
  from /Users/fernandolizana/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:10:in `&lt;main&gt;'
  </code></pre>
  
  <p>I have tried reinstalling cocoapods and using another version of ruby.</p>