2

I'm fully at a loss here. I have `dm-postgres-adapter' in my gem file, and it's causing me a lot of headaches.

When I run bundle install on a small app before pushing to heroku, I'm met with this:

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.

I've spent the last couple of hours stumbling around the internet, so I'll list what I've tried to no avail:

Completely reinstalling postgresql through brew. run with --with-pg-config=PATH (or something similar) Add postgres to my path soft linking gcc to gcc4.2

I know where mb/pg_wchar.h is located. It's in /usr/local/Cellar/postgresql/9.3.4/include/server/mb/pg_wchar.h/ right there. I've tried most of the options it lists with usr/local/Cellar/postgresql/9.3.4/include/server/, but none of the ones I've tried have worked. I think it's worth noting that postgres.h is located in the same directory as mb/pg_wchar.h, in the /server/ folder.

If anyone could possibly shed some light on this, that would be great.

Cereal
  • 3,699
  • 2
  • 23
  • 36
  • Looks like there's an identical question here: http://stackoverflow.com/questions/19998879/gem-install-dm-postgres-adapter-build-error Still no solution, though. – Cereal Mar 23 '14 at 01:18

0 Answers0