versions i am using
Ruby 2.7.2
Rails 6.1.7.6
pg 1.5.4
postgresql 14
my database.yml file
production:
adapter: postgresql
host: host
database: dbname
username: postgres
password: "##abc"
port: 5432
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
gssencmode: disable
when i run
export RAILS_ENV=production
rails c
I'm greeted with this error
vendor/bundle/ruby/2.7.0/gems/pg-1.5.4/lib/pg/connection.rb:690: [BUG] Segmentation fault at 0x00007fc4b57f3140
ruby 2.7.2p137 (2020-10-01 revision 544352) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0084 p:---- s:0480 e:000479 CFUNC :connect_poll
c:0083 p:0551 s:0476 e:000475 METHOD /home/ubuntu/path/vendor/bundle/ruby/2.7.0/gems/pg-1.5.4/lib/pg/connection.rb:690
c:0082 p:0356 s:0463 e:000462 METHOD /home/ubuntu/path/vendor/bundle/ruby/2.7.0/gems/pg-1.5.4/lib/pg/connection.rb:824
c:0081 p:0007 s:0452 e:000451 METHOD /home/ubuntu/path/vendor/bundle/ruby/2.7.0/gems/pg-1.5.4/lib/pg/connection.rb:759
c:0080 p:0019 s:0446 e:000445 METHOD /home/ubuntu/path/vendor/bundle/ruby/2.7.0/gems/pg-1.5.4/lib/pg.rb:63
c:0002 p:0031 s:0006 e:000005 EVAL bin/rails:4 [FINISH]
c:0001 p:0000 s:0003 E:001ba0 (none) [FINISH]
how can i resolve this segmentation fault? this is the issue with production only, in development it was working fine, i tried to reinstall the pg gem multiple times, but no luck.
when i did, pg_lsclusters
it's online,
14 main 5432 online postgres