【发布时间】:2014-07-15 13:16:51
【问题描述】:
我正在尝试在 Mavericks 的 Rails 项目中运行 bundle。使用此错误访问 pg gem 时失败。
它说 你的 PostgreSQL 太旧了。安装此 gem 的旧版本或升级您的数据库。。所以我安装了postgresql-9.3.4 和gem install gem 但发生了同样的错误。
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/path/to/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/php5/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... no
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database.
*** 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=/path/to/.rvm/rubies/ruby-2.1.1/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--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
--with-pqlib
--without-pqlib
extconf failed, exit code 1
提前致谢。
【问题讨论】:
标签: ruby-on-rails ruby postgresql