undefined symbol: rb_eEncCompatError in pgconn_internal_encoding_set

Issue #117 invalid
Former user created an issue

I'm trying to run pg with rails 3.0.9. When trying to start a rails console, I get this error:

/usr/lib/ruby/gems/1.9.1/gems/pg-0.13.2/lib/pg_ext.so: /usr/lib/ruby/gems/1.9.1/gems/pg-0.13.2/lib/pg_ext.so: undefined symbol: rb_eEncCompatError - /usr/lib/ruby/gems/1.9.1/gems/pg-0.13.2/lib/pg_ext.so (LoadError)

I pinpointed this to the method pgconn_internal_encoding_set , but coulnd't find any way to fix it. Removing this error would just cause the lib to segfault.

My system is a debian lenny with postgresql 8.3 dev libs installed

ruby1.9 --version

ruby 1.9.3p125 (2012-02-16) [x86_64-linux]

Comments (2)

  1. Michael Granger repo owner
    • changed status to open

    Very strange. I can see that symbol in my libruby under MacOS X:

    $ otool -Iv ~/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib | grep rb_eEncCompat
    0x00000000002251a0 20214 _rb_eEncCompatError

    It also shows up in a friend of mine's Linux box with an RVM-installed 1.9.3-p125:

    $ readelf -s ~/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.so.1.9 | grep rb_eEncCompatError		
     541: 000000000043bb38     8 OBJECT  GLOBAL DEFAULT   24 rb_eEncCompatError		
    4468: 000000000043bb38     8 OBJECT  GLOBAL DEFAULT   24 rb_eEncCompatError

    Would you mind running the same command on your libruby and pasting the output?

  2. Log in to comment