I'm starting to look at postgres because I'm going to need it for its GIS extensions. But I run in into a problem when trying to install the ruby-postgres gem. I get this error Building native extensions. This could take a while... ERROR: Error installing ruby-postgres: ERROR: Failed to build gem native extension. blah blah blah etc postgres.c:31: error: conflicting types for â€˜pg_encoding_to_charâ€™ /usr/include/postgresql/libpq-fe.h:518: error: previous declaration of â€˜pg_encoding_to_charâ€™ was here postgres.c: In function â€˜pgconn_s_escape_byteaâ€™: postgres.c:370: warning: pointer targets in passing argument 1 of â€˜PQescapeByteaâ€™ differ in signedness postgres.c: In function â€˜pgconn_s_unescape_byteaâ€™: postgres.c:401: warning: pointer targets in passing argument 1 of â€˜PQunescapeByteaâ€™ differ in signedness make: *** [postgres.o] Error 1 Presumably some people have installed Postgresql and got it to work with Ruby. Does anyone have any experience solving this problem? Thanks John S.
on 2009-02-07 08:32
on 2009-04-08 20:40
change /usr/include/libpq-fe.h (extern const char *pg_encoding_to_char(int encoding); to extern char *pg_encoding_to_char(int encoding);) # remove const
on 2009-04-09 09:56
Jorge Queiruga wrote: > change /usr/include/libpq-fe.h (extern const char > *pg_encoding_to_char(int encoding); to extern char > *pg_encoding_to_char(int encoding);) # remove const Thanks for that I've already switched to using the newer ruby-pg gem and that seems OK. Ta John S.