Ruby Ruby 3.2 + PG 1.5 Segmentation fault 解决办法

daqing · December 23, 2023 · Last by pynix replied at December 30, 2023 · 417 hits

原文链接:https://xe2v.com/topics/13


如果你在 Mac 上开发 rails 项目,使用最新的 Ruby 3.2.2 和 pg 1.5.4,程序启动后,遇到 Segmentation fault 崩溃退出的情况,可以这样解决。

首先,GitHub 上有人反馈了:

https://github.com/ged/ruby-pg/issues/538


解决办法,就是在 config/database.yml 中,增加一行配置:

<% if RUBY_PLATFORM =~ /darwin/ %>gssencmode: disable<% end %>

经过验证,可以解决。

export PGGSSENCMODE="disable"

You need to Sign in before reply, if you don't have an account, please Sign up first.