将Mac OS更新为Mojave之后,我在我的计算机上的仅1 个Rails应用程序中遇到了此问题。我无法理解数千行。这是堆栈跟踪的开始。我可以启动Rails服务器,但是在第一个请求的情况下,该崩溃报告会显示出来。它可能与Postgres有关。但是我的其他应用程序也使用相同的配置。
我正在将Rails 5.2.1与Ruby 2.5.1结合使用。
[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]
答案 0 :(得分:0)
我找到了针对此问题的临时修复程序,并已在此处发布了解决方案:pg.rb segmentation fault [Mojave upgrade]
该崩溃与彪马有关,我设法在puma.rb
中修复了该问题:
workers ENV.fetch("WEB_CONCURRENCY") { 2 } unless Rails.env.development?