Postgresql 在MacOS上安装do_postgres

Postgresql 在MacOS上安装do_postgres,postgresql,bundler,psql,Postgresql,Bundler,Psql,我在这里完全不知所措。我的gem文件中有“dm postgres adapter”,这让我很头疼 当我在推到heroku之前在一个小应用程序上运行bundle install时,我会遇到以下问题: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/r

我在这里完全不知所措。我的gem文件中有“dm postgres adapter”,这让我很头疼

当我在推到heroku之前在一个小应用程序上运行bundle install时,我会遇到以下问题:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for postgres.h... yes
checking for mb/pg_wchar.h... no
*** 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
    --without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
    --with-pgsql-server-dir
    --without-pgsql-server-dir
    --with-pgsql-server-include
    --without-pgsql-server-include=${pgsql-server-dir}/include
    --with-pgsql-server-lib
    --without-pgsql-server-lib=${pgsql-server-dir}/
    --with-pgsql-client-dir
    --without-pgsql-client-dir
    --with-pgsql-client-include
    --without-pgsql-client-include=${pgsql-client-dir}/include
    --with-pgsql-client-lib
    --without-pgsql-client-lib=${pgsql-client-dir}/
    --with-pqlib
    --without-pqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/do_postgres-0.10.14 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/do_postgres-0.10.14/ext/do_postgres/gem_make.out

An error occurred while installing do_postgres (0.10.14), and Bundler cannot continue.
Make sure that `gem install do_postgres -v '0.10.14'` succeeds before bundling.
我花了几个小时在互联网上结结巴巴地转来转去,所以我将列出我尝试过但没有成功的地方:

通过brew完全重新安装postgresql。 使用pg config=PATH运行(或类似) 将postgres添加到我的路径 软链接gcc到gcc4.2

我知道mb/pg_wchar.h在哪里。它就在那里。我已经尝试了它列出的大多数选项,包括usr/local/cillar/postgresql/9.3.4/include/server/,但我尝试过的选项都不起作用。我认为值得注意的是,
postgres.h
mb/pg_wchar.h
位于
/server/
文件夹中的同一目录中


如果有人能对此有所了解,那就太好了。

这里似乎有一个相同的问题:尽管如此,仍然没有解决方案。