加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

自升级到Ruby 2.2.0以来的符号查找错误

发布时间:2020-12-17 03:24:17 所属栏目:百科 来源:网络整理
导读:我收到此错误,因为升级到2.2.0,只发生在发送给puma的http请求时: 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:
我收到此错误,因为升级到2.2.0,只发生在发送给puma的http请求时:

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

原因是什么以及如何解决这个问题?

降级到2.1.5无论如何都解决了这个问题.

解决方法

版本0.14.1之前的pg gem使用方法rb_thread_select.在Ruby 2.2中删除了此方法.根据 their history file,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().

[...]

所以你可能正在使用旧的pg gem.将此gem升级到至少0.15.0应该可以解决您的问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读