ruby on rails - error occurred while installing pg (0.15.1), and Bundler cannot continue -


i'm trying run bundle install before starting rails server , keep getting error

an error occurred while installing pg (0.15.1), , bundler cannot continue. make sure `gem install pg -v '0.15.1'` succeeds before bundling. 

note i've tried installing postgres , i've tried fixing path pg_config

any idea what's going on?

the entire portion of log reads:

installing pg (0.15.1) native extensions  gem::installer::extensionbuilderror: error: failed build gem native extension.          /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb  checking pg_config... yes using config values /usr/bin/pg_config checking libpq-fe.h... yes checking libpq/libpq-fs.h... yes checking pg_config_manual.h... yes checking pqconnectdb() in -lpq... yes checking pqconnectionusedpassword()... yes checking pqisthreadsafe()... yes checking pqprepare()... yes checking pqexecparams()... yes checking pqescapestring()... yes checking pqescapestringconn()... yes checking pqescapeliteral()... yes checking pqescapeidentifier()... yes checking pqgetcancel()... yes checking lo_create()... yes checking pg_encoding_to_char()... yes checking pg_char_to_encoding()... yes checking pqsetclientencoding()... yes checking pqlibversion()... yes checking pqping()... yes checking pqsetsinglerowmode()... no checking rb_encdb_alias()... yes checking rb_enc_alias()... yes checking rb_thread_call_without_gvl()... yes checking rb_thread_call_with_gvl()... yes checking rb_thread_fd_select()... yes checking rb_w32_wrap_io_handle()... no checking pgres_copy_both in libpq-fe.h... no checking pgres_single_tuple in libpq-fe.h... no checking struct pgnotify.extra in libpq-fe.h... yes checking unistd.h... yes checking ruby/st.h... yes creating extconf.h creating makefile  make compiling gvl_wrappers.c compiling pg.c pg.c: in function ‘init_pg_ext’: pg.c:384: error: ‘pqping_ok’ undeclared (first use in function) pg.c:384: error: (each undeclared identifier reported once pg.c:384: error: each function appears in.) pg.c:386: error: ‘pqping_reject’ undeclared (first use in function) pg.c:388: error: ‘pqping_no_response’ undeclared (first use in function) pg.c:390: error: ‘pqping_no_attempt’ undeclared (first use in function) make: *** [pg.o] error 1   gem files remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/pg-0.15.1   inspection. results logged /usr/local/rvm/gems/ruby-1.9.3-p392/gems/pg-0.15.1/ext/gem_make.out error occurred while installing pg (0.15.1), , bundler cannot continue. make sure `gem install pg -v '0.15.1'` succeeds before bundling. 

questioner did not specify os.

on ubuntu , other debian flavors, try this:

sudo apt-get install libpq-dev 

this should automatically pull in other dependencies if don't have them installed.

looks dooleyburger's answer appropriate various shades of red hat.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -