title: Could not bundle install because of 'pg'
body: <p>I'm learning R o R. Then, I want to make a website by using postgresql.
  But, this error makes me crazy.
  Please, help me !</p>
  
  <pre><code>$ sudo bundle install
  
  creating Makefile
  
  make "DESTDIR="
  compiling gvl_wrappers.c
  compiling pg.c
  compiling pg_connection.c
  pg_connection.c:2323:3: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration]
                  gettimeofday(&amp;currtime, NULL);
                  ^
  1 warning generated.
  compiling pg_errors.c
  compiling pg_result.c
  linking shared-object pg_ext.bundle
  ld: file not found: dynamic_lookup
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [pg_ext.bundle] Error 1
  
  Gem files will remain installed in /Users/Sean/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1 for inspection.
  Results logged to /Users/Sean/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1/ext/gem_make.out
  An error occurred while installing pg (0.17.1), and Bundler cannot continue.
  Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.
  </code></pre>
  
  <h1>I tried all ways I could.</h1>
  
  <p>For example, I tried to change pass of pg.
  But, I couldn't.</p>
  
  <p>Then, I tried</p>
  
  <pre><code>$ brew update
  $ brew uninstall postgresql
  $ brew install postgresql
  $ gem install pg
  $ bundle install
  </code></pre>
  
  <p>But, it didn't work.</p>
  
  <p>How can I do for this error !?</p>