Pg Gem installation issue after upgrading Ruby2.2 for Rails3.2.18

225 views
Skip to first unread message

PAVAN KUMAR IMMANNI

unread,
Aug 22, 2019, 1:09:18 PM8/22/19
to rubygems.org
Question:

Under ubuntu-12.04_32bit OS, i installed with Ruby 1.9.3 and Rails 3.2.18.

Postgresql DB server is: 9.1, pg gem -v '0.13.2'

After upgrading Ruby from 1.9.3 to 2.2.0, i'm not able to do any rake operations. With this error https://stackoverflow.com/questions/37083480/pg-ext-so-undefined-symbol-rb-thread-select


So i was trying to upgrade pg gem from 0.13.2 to >=0.15.1 version.

I ended up with Following error, not able to resolve this. Can someone please help me to resolve this issue?

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/blueserver/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20190822-25751-10e8nmf.rb extconf.rb --with-pg-config=/usr/bin/pg_config
Using config values from /usr/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... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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=/home/blueserver/.rvm/rubies/ruby-2.2.0/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--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-pg-config
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib

extconf failed, exit code 1

Gem files will remain installed in /home/blueserver/.rvm/gems/ruby-2.2.0/gems/pg-0.15.1 for inspection.
Results logged to /home/blueserver/.rvm/gems/ruby-2.2.0/extensions/x86-linux/2.2.0/pg-0.15.1/gem_make.out
An error occurred while installing pg (0.15.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.1'` succeeds before bundling.

Note: I tried different resources from Google, but no luck.


kee...@thebrocks.net

unread,
Aug 24, 2019, 1:01:00 PM8/24/19
to rubyge...@googlegroups.com
Hello Pavan,

Go to the pg gem homepage or github account. They know the gem and can help


--
You received this message because you are subscribed to the Google Groups "rubygems.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubygems-org...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubygems-org/f1d08d40-acba-4090-bb81-05f406178f64%40googlegroups.com.

whdzera

unread,
Sep 9, 2019, 9:36:00 AM9/9/19
to rubygems.org
install libpq , libpq-dev
Reply all
Reply to author
Forward
0 new messages