我已經在互聯網這個看着所有的解決方案,重新安裝的一切,仍然一無所獲......當我做寶石安裝PG我得到:PostgreSQL的PG寶石將不會在OS X上安裝
Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.
/Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb --with-pgsql->lib=/usr/local/Cellar/postgresql/9.2.1/lib --with-pg->config=/usr/local/Cellar/postgresql/9.2.1/bin/pg_config
Using config values from /usr/local/Cellar/postgresql/9.2.1/bin/pg_config checking for libpq-fe.h... * 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/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/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 /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in
try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in
try_cpp' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:970:inblock in find_header' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in
block in checking_for' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:inblock (2 levels) in postpone' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in
open' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:inblock in postpone' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in
open' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:inpostpone' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in
checking_for' from /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:969:infind_header' from extconf.rb:41:in
'Gem files will remain installed in /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/pg-0.14.1 for inspection. Results logged to /Users/henriquedubugras/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/pg-0.14.1/ext/gem_make.out
我嘗試設置pg_config路徑,安裝了xcode,從xcode安裝了我的命令行工具,我的ruby版本是由RVM安裝的1.9.3。
我的Mac是OS X Mountain Lion
謝謝你們!