-1
Mac OS X 10.6.8에서 gem install pg
을 시도 할 때 다음 오류가 발생합니다. Heroku에 내 Rails 웹 사이트를 푸시하려고합니다. 루비 1.9.3p194의 꽤 표준 설치.pg gem을 설치할 수 없음
$ cat /Users/me/.rvm/gems/ruby-1.9.3-p194\@ucode/gems/pg-0.15.1/ext/gem_make.out
/Users/me/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
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=/Users/me/.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
--without-pg-config
--with-pg_config
--without-pg_config
이전에는 로컬로 postgresql을 설치할 필요가 없었습니다. 데이터베이스를 설치해야합니까? 사실 나는 심지어 지금 바로 Heroku가
에, 로컬 PostgreSQL을 사용하지 않을
"로컬로 postgresql을 사용할 계획이 없습니다."라는 말은 정말 나쁜 생각입니다. 다른 데이터베이스를 사용하여 개발하고 배포하는 것이 고통과 고통의 흔한 원천입니다. 그리고 아니, ActiveRecord와 같은 ORM은 데이터베이스의 차이점으로부터 당신을 보호하지 않습니다. 따라서 PostgreSQL을 로컬에 설치하고 PostgreSQL을 기반으로 배포 할 계획이라면 PostgreSQL을 사용하여 개발하십시오. –
가능 [중복] (http://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-pg-gem-on-ubuntu?rq= 10) – fotanus
gem에는 PGSQL 설치와 함께 제공되는 PostgreSQL (PGSQL) 헤더 파일이 필요한 네이티브 C 확장이 있습니다. PGSQL을 설치하지 않아도 될지 의심 스럽습니다. Homebrew로 설치하는 것은 간단합니다.'brew install postgresql'을 실행하고 화면의 지시 사항을 따르십시오. –