【发布时间】:2011-07-07 06:32:16
【问题描述】:
我将pg gem 添加到我的gemfile 中
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 时,我该怎么做?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 gem bundler