Skip to content

Instantly share code, notes, and snippets.

@cyanglee
Created January 6, 2020 03:18
Show Gist options
  • Save cyanglee/197dcb49effda665d652eaea9dabd050 to your computer and use it in GitHub Desktop.
Save cyanglee/197dcb49effda665d652eaea9dabd050 to your computer and use it in GitHub Desktop.
Rails with Postgres 12 issue
  • Ran into an weird pg related issue:
.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56: [BUG] Segmentation fault at 0x0000000000000110
— Control frame information ———————————————————————
c:0071 p:—— s:0406 e:000405 CFUNC  :initialize
c:0070 p:—— s:0403 e:000402 CFUNC  :new
c:0069 p:0016 s:0398 e:000397 METHOD /Users/xxx/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56
c:0068 p:0107 s:0393 e:000392 METHOD /Users/xxx/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/postgres

This happens only on pg 12+. The solution is to add the following setting: Ruby 2.6.5 and PostgreSQL pg-gem segmentation fault - Stack Overflow

default: &default
  adapter: postgresql

development:
  <<: *default
  gssencmode: disable
test:
  <<: *default
  gssencmode: disable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment