Kok*_*zzu 6 ruby postgresql puma
我收到此错误,因为升级到2.2.0,只发生在http请求发送到puma
:
puma 2.10.2 (tcp://0.0.0.0:22555): symbol lookup error:
/usr/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/do_postgres-0.10.14/do_postgres/do_postgres.so:
undefined symbol: rb_thread_select
Run Code Online (Sandbox Code Playgroud)
原因是什么以及如何解决这个问题?
降级到2.1.5无论如何都解决了这个问题.
pg
版本0.14.1之前的gem使用该方法rb_thread_select
.在Ruby 2.2中删除了此方法.根据他们的历史文件,2013年3月发布的版本0.15.0不再使用它:
== v0.15.0 [2013-03-03] Michael Granger <ged@FaerieMUD.org>
[...]
Enhancements:
- Make use of rb_thread_fd_select() on Ruby 1.9 and avoid deprecated
rb_thread_select().
[...]
Run Code Online (Sandbox Code Playgroud)
所以你可能正在使用旧pg
宝石.将此gem升级到至少0.15.0应该可以解决您的问题.