Impossible d'installer le pg gem dans Mavericks avec Postgres.app

Je suis en train d'installer le pg gem pour une utilisation avec Postgres.app sur ma machine locale. Je suis sous Mavericks.

Postgres.app est installé et en cours d'exécution fine, mais je ne peux pas obtenir la gemme de travail. J'ai effectué les opérations suivantes:

  1. Utilisé la commande " env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config " de la Postgres.app de la documentation
  2. Mis à jour Homebrew et installé la Pomme de GCC 4.2
  3. Installé Xcode developer tools
  4. Mis à jour mon $PATH pour faire référence à la fois à la Postgres.app bin et lib

Tous, sans succès. Voici le message d'erreur spécifique-je recevoir:

Building native extensions with: '--with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config'
This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

    /Users/Brian/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config
Using config values from /Applications/Postgres.app/Contents/MacOS/bin/pg_config
sh: /Applications/Postgres.app/Contents/MacOS/bin/pg_config: No such file or directory
sh: /Applications/Postgres.app/Contents/MacOS/bin/pg_config: No such file or directory
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/Brian/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
    --with-pg
    --without-pg
    --with-pg-config
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/

J'apprécierais toute aide que vous pouvez offrir. Merci!

InformationsquelleAutor blundin | 2013-11-26