Segmentation Fault in Rails Console with Ruby 2.6.3 and Rails 5.2.8

105 Views Asked by At

I'm encountering a segmentation fault error when running rails console in my Rails 5.2.8 application with Ruby 2.6.3. The issue arises when I attempt to access any database record, for instance, using Consultation.last. Here's the console output (with personal path details omitted):

Running via Spring preloader in process 76743
Loading development environment (Rails 5.2.8)
[1] pry(main)> con = Consultation.last 
.../gems/pg-1.4.1/lib/pg/connection.rb:591: [BUG] Segmentation fault at 0x000...
ruby 2.6.3p62 (2019-04-16 revision 67580) [-darwin23]

This is followed by a detailed crash report and control frame information.

Steps I've already Taken:

  • Reinstalled Ruby using both rbenv and chruby.
  • Ensured all gems are compatible and up-to-date with the current Rails version.
  • Checked logs for specific error patterns or additional information.

Constraints:

Upgrading Ruby or Rails is currently not an option due to project constraints.

Questions:

Has anyone experienced a similar issue? Are there known issues with the pg gem (version 1.4.1) compatibility with this Ruby version? Any recommendations for troubleshooting or resolving this segmentation fault?

Any advice or insights would be greatly appreciated. Thank you for your help!

0

There are 0 best solutions below