반응형
번들 설치를 실행할 때 gem 설치를위한 매개 변수를 어떻게 전달할 수 있습니까?
내 gemfile에 pg gem 을 추가했습니다.
gem 'pg'
실행 bundle install
하면 다음 오류가 발생합니다.
Installing pg (0.10.1) with native extensions /Users/ben/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/benhartney/.rvm/rubies/ruby-1.9.2-p0/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.
이 구성 매개 변수를 전달해야하는 것 같습니다.
--with-pg-config=/path/to/pg_config
사용할 때 어떻게 할 수 bundle install
있습니까?
다음과 같이 빌드 구성 옵션을 설정해야합니다.
bundle config build.pg --with-pg-config=/path/to/pg_config
더 많은 정보는 번들 구성 매뉴얼 페이지 에서 찾을 수 있습니다 .
'번들 설치'전에 '번들 구성'을 실행하여 매개 변수를 설정하십시오.
bundle config build.pg --with-pg-config=/path/to/pg_config
bundle install
와 Rails3 와 PostgreSQL을 . 나는 이것을 좋아한다
>rails new test_app -d postgreSQL
>cd test_app
>mkdir .bundle
>echo "BUNDLE_BUILD__PG: --with-pg-config=/opt/local/lib/postgresql91/bin/pg_config" > .bundle/config
>bundle install
소스 제어에서 구성을 유지할 수 있습니다.
사용자 프로필
bundle config build.pg --with-pg-config=/opt/local/lib/postgresql91/bin/pg_config
~ / .bundle / config 파일이 생성됩니다.
Ruby 2.x 이상을 사용하는 경우 thrift 0.9.0을 빌드 할 수 없습니다. https://issues.apache.org/jira/browse/THRIFT-2219를 참조 하십시오 . Thrift 0.9.2가 수정되었습니다.
다음을 설치해보십시오. gem install rbhive -v 1.0.3.pre
반응형
'Nice programing' 카테고리의 다른 글
gradle-다른 jar와 함께 lib dir이있는 jar를 어떻게 빌드합니까? (0) | 2020.11.24 |
---|---|
Eclipse가 Maven 종속성을 업데이트하는 데 시간이 오래 걸리는 이유는 무엇입니까? (0) | 2020.11.24 |
정적 라이브러리 디버그 기호 (0) | 2020.11.24 |
자바 스크립트에서 유효하지 않은 필드를 표시 할 수 있습니까? (0) | 2020.11.24 |
구성 전에 개체 참조 보내기 (0) | 2020.11.24 |