I have
Ruby 3.0.4
Rails 6.1.7
pg 1.4.5
postgresql 14.6
Here is my database.yml file
development:
adapter: postgresql
encoding: utf8
database: olio_development
username: postgres
password: password
pool: 5
host: 127.0.0.1
port: 5432
gssencmode: disable
When I run rake db:create I am getting the following segmentatin fault
/home/usr/.rvm/gems/ruby-3.0.4/gems/pg-1.4.5/lib/pg/connection.rb:626: [BUG] Segmentation fault at 0x00007fd79729a140
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0050 p:---- s:0275 e:000274 CFUNC :connect_poll
c:0049 p:0543 s:0271 e:000270 METHOD /home/suganya/.rvm/gems/ruby-3.0.4/gems/pg-1.4.5/lib/pg/connection.rb:626
The connection fails.
I have verified postgres is running and is on host 127.0.0.1 and post 5432.
Please help me how to resolve this segmentation fault?
I'm seeing a GitHub issue for the pg gem ( https://github.com/ged/ruby-pg/issues/493 ) that matches your problem, so it might be a bug with pg v1.4.5. I would try pinning it to an older version:
gem 'pg', '1.4.4'
And work your way backwards if that still has issues. You can also add your information to the GitHub issue linked above to help the maintainers resolve the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.