title: How can I find the source of my Rails app crashing after first request from client (pg.rb segmentation fault) after an upgrade to macOS Mojave?
body: <p>After updating my Mac OS to Mojave, I encountered this problem in <strong>only 1</strong>  of the Rails applications on my machine. I can't make sense out of the thousands of lines. Here is the beginning of the stack trace. I can start the rails server but with the first request, this crash report shows up. It might have something to do with Postgres. But I use the same configuration for my other apps as well.</p>
  
  <p>I am using Rails 5.2.1 with Ruby 2.5.1.</p>
  
  <pre><code>[NOTE]
  You may have encountered a bug in the Ruby interpreter or extension libraries.
  Bug reports are welcome.
  For details: http://www.ruby-lang.org/bugreport.html
  
  [IMPORTANT]
  Don't forget to include the Crash Report log file under
  DiagnosticReports directory in bug reports.
  
  Started GET "/" for 127.0.0.1 at 2018-12-17 17:51:38 +0100
  /Users/steven/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pg-1.1.3/lib/pg.rb:56: [BUG] Segmentation fault at 0x000000010b42da3a
  ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
  
  -- Crash Report log information --------------------------------------------
     See Crash Report log file under the one of following:                    
       * ~/Library/Logs/DiagnosticReports                                     
       * /Library/Logs/DiagnosticReports                                      
     for more details.                                                        
  Don't forget to include the above Crash Report log file in bug reports.     
  
  -- Control frame information -----------------------------------------------
  c:0054 p:---- s:0374 e:000373 CFUNC  :initialize
  c:0053 p:---- s:0371 e:000370 CFUNC  :new
  c:0052 p:0016 s:0366 e:000365 METHOD /Users/steven/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pg-1.1.3/lib/pg.rb:56
  c:0051 p:0013 s:0361 e:000360 METHOD /Users/steven/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresq
  c:0050 p:0030 s:0356 e:000355 METHOD /Users/steven/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresq [FINISH]
  </code></pre>