私は実行していますOSX 10.8.2
、コマンドラインツールでインストールされたXcode。
バンドルしようとしていますが、いくつかの宝石(下部で指定します)で次のようになります。
ERROR: Failed to build gem native extension
..。
Could not create Makefile due to some reason
gem 'pg'
これまでのところ、とでエラーが発生しますgem 'binding_of_caller'
エラーはMakefileを作成できないことと関係があると思いますが、エラーを解決するのに役立つものは何も見つかりません。以下に完全なエラーを貼り付けました:
私は何をすべきか途方に暮れています。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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/1.8/usr/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /Users/ericavirtue/.bundler/tmp/75812/gems/pg-0.14.1 for inspection.
Results logged to /Users/ericavirtue/.bundler/tmp/75812/gems/pg-0.14.1/ext/gem_make.out
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.
編集:私はrbenv
rubyのバージョンを管理するために使用していて、実行していると表示されます1.9.3 -p385
システムrubyは古いバージョンですが、私が知る限り、それは問題ではありません。
postgresql
経由でインストールしましたhomebrew
編集2:
RVM
ルビー管理に切り替えようとしましたが、別のmakeエラーが発生します:
Error running 'make -j2', please read ... ruby-1.9.3-p385/make.log
There has been an error while running make. Halting the installation.
make.logファイルが存在しません...