所以这是我尝试运行bundle install时的样子:
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/kory/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Using config values from /usr/pgsql-9.1/bin/pg_config
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
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()... yes
checking for PQisthreadsafe()... yes
checking for PQprepare()... yes
checking for PQexecParams()... yes
checking for PQescapeString()... yes
checking for PQescapeStringConn()... yes
checking for PQescapeLiteral()... yes
checking for PQescapeIdentifier()... yes
checking for PQgetCancel()... yes
checking for lo_create()... yes
checking for pg_encoding_to_char()... yes
checking for pg_char_to_encoding()... yes
checking for PQsetClientEncoding()... yes
checking for PQlibVersion()... yes
checking for PQping()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for struct pgNotify.extra in libpq-fe.h... yes
checking for unistd.h... yes
checking for ruby/st.h... yes
creating extconf.h
creating Makefile
make
compiling pg.c
compiling pg_connection.c
pg_connection.c: In function ‘pgconn_wait_for_notify’:
pg_connection.c:2064: warning: ‘rb_thread_select’ is deprecated (declared at /Users/kory/.rbenv/versions/1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:379)
pg_connection.c: In function ‘pgconn_block’:
pg_connection.c:2594: warning: ‘rb_thread_select’ is deprecated (declared at /Users/kory/.rbenv/versions/1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:379)
compiling pg_result.c
linking shared-object pg_ext.bundle
ld: warning: directory not found for option '-L-Wl,-undefined,dynamic_lookup'
Undefined symbols for architecture x86_64:
"_rb_define_module", referenced from:
_Init_pg_ext in pg.o
"_rb_eStandardError", referenced from:
_Init_pg_ext in pg.o
"_rb_define_class_under", referenced from:
_Init_pg_ext in pg.o
_init_pg_connection in pg_connection.o
_init_pg_result in pg_result.o
"_rb_define_module_under", referenced from:
_Init_pg_ext in pg.o
"_rb_define_singleton_method", referenced from:
_Init_pg_ext in pg.o
_init_pg_connection in pg_connection.o
"_rb_singleton_class", referenced from:
_Init_pg_ext in pg.o
_init_pg_connection in pg_connection.o
"_rb_define_alias", referenced from:
_Init_pg_ext in pg.o
_init_pg_connection in pg_connection.o
_init_pg_result in pg_result.o
"_rb_define_attr", referenced from:
我把它作为短暂的简短。但从它看起来它是试图使用错误的postgres。我不知道为什么,我似乎无法动摇这件事。
我正在安装postgres并且它是版本9.2.3,这就是为什么我认为捆绑器试图从我的机器上不存在的版本(9.1)尝试使用配置文件有点奇怪,我想它是extconf.rb。因为它是指向它的人。但我无法弄清楚如何重置这个,所以我的宝石正确安装。which postgres
/usr/local/bin/postgres