Jump to content

Ruby pg Gem


Malmoth

Recommended Posts

The most recent Ruby gem for PostgreSQL access is pg.

However, since the required PostgreSQL headers do not exist on the server, gem can't build the native extension for pg.

Is it possible to install PostgreSQL headers?

 

INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install -y pg
checking for main() in -lpq... no
checking for main() in -llibpq... no
checking for main() in -lms/libpq... no
*** 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=/usr/bin/ruby
    --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
    --with-libpqlib
    --without-libpqlib
    --with-ms/libpqlib
    --without-ms/libpqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created


Gem files will remain installed in /home/malmoth/ruby/gems/gems/pg-0.8.0 for inspection.
Results logged to /home/malmoth/ruby/gems/gems/pg-0.8.0/ext/gem_make.out

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...