Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to link ruby pg to my own libpq.so
    text
    copied!<p>I have customized my own postgresql client and postgresql client-devel package and I want it to be available to Ruby programmer. So the command to install ruby pg gem is as below:</p> <pre><code>gem install pg -- --with-pg-config=/usr/local/mypostgres-1.0/bin/pg_config --with-ldflags="-Wl,-rpath,/usr/local/mypostgres-1.0/lib" </code></pre> <p>The command works pretty good if there is only my own postgresql installed. </p> <p>My pg_config output looks good: </p> <pre><code>BINDIR = /usr/local/mypostgres-1.0/bin DOCDIR = /usr/local/mypostgres-1.0/doc HTMLDIR = /usr/local/mypostgres-1.0/doc INCLUDEDIR = /usr/local/mypostgres-1.0/include PKGINCLUDEDIR = /usr/local/mypostgres-1.0/include INCLUDEDIR-SERVER = /usr/local/mypostgres-1.0/include/server LIBDIR = /usr/local/mypostgres-1.0/lib PKGLIBDIR = /usr/local/mypostgres-1.0/lib LOCALEDIR = /usr/local/mypostgres-1.0/share/locale MANDIR = /usr/local/mypostgres-1.0/man SHAREDIR = /usr/local/mypostgres-1.0/share SYSCONFDIR = /usr/local/mypostgres-1.0/etc PGXS = /usr/local/mypostgres-1.0/lib/pgxs/src/makefiles/pgxs.mk VERSION = PostgreSQL 9.0.0 </code></pre> <p>However, if there are both official and my customized postgresql installed. The installed driver will be linked against official libpq.so instead of my own libpq.so. Is there any way to force ruby-pg to be linked against my own libpq.so? Any clue or hint will be appreciated.</p> <p>If I can't do this in this way, how would I customize the gem to link to my library?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload