0
저는 Mac OS X입니다. sudo env ARCHFLAGS="-arch i386" gem install pg
을 실행하면 정상적으로 작동합니다. 내가 브라우저에서 내 레일 프로젝트를 방문 할 때 그러나, 나는이 오류 : 다음 0.10.1을 제거하고 0.10.0를 설치하려고하면레일스는 pg 0.10.0을 원하지만 pg 0.10.1 만 설치할 수 있습니다.
Could not find pg-0.10.0 in any of the sources (Bundler::GemNotFound)
,이 얻을 :
$ sudo env ARCHFLAGS="-arch i386" gem install pg --version 0.10.0
Password:
Building native extensions. This could take a while...
ERROR: Error installing pg:
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
Ruby cflags: "-arch i386 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common "
MacOS X build: fixing architecture flags:
using the value in ARCHFLAGS environment variable ("-arch i386").
finding flags common to both Ruby and PostgreSQL...
testing for architecture: "ppc"
testing for architecture: "i386"
common arch flags: -arch i386
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
--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-config
--without-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}/lib
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.10.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.10.0/ext/gem_make.out
레일스가 pg 0.10.1을 허용하도록하는 방법을 찾았는지 또는 pg 0.10.0을 설치하는 방법을 찾았는지 여부에 상관 없지만 둘 중 하나를해야합니다.
그 것처럼 보입니다. 감사. –