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 Small -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 constThanks for that I''ve already switched to using the newer ruby-pg gem and that seems OK. Ta John Small -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---