0

今までrails s しても表示されていたのに、
いつの間にかどのリポジトリもrails sで実行してもブラウザー上で表示されなくなりました。
解決したいです。

rails sで実行できるけど↓

> jhon1998@JhonDH talk % rails s
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:66:
> warning: already initialized constant Net::ProtocRetryError
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68:
> warning: previous definition of ProtocRetryError was here
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:206:
> warning: already initialized constant Net::BufferedIO::BUFSIZE
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:214:
> warning: previous definition of BUFSIZE was here
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:503:
> warning: already initialized constant Net::NetPrivate::Socket
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:541:
> warning: previous definition of Socket was here
> => Booting Puma
> => Rails 6.0.6.1 application starting in development 
> => Run `rails server --help` for more startup options Puma starting in single mode...
> * Version 3.12.6 (ruby 2.6.5-p114), codename: Llamas in Pajamas
> * Min threads: 5, max threads: 5
> * Environment: development
> * Listening on tcp://localhost:3000 
Use Ctrl-C to stop

ブラウザーで確認するとアクセスできませんと表示され
画像の説明をここに入力

ターミナルでは以下のような長文が表示され、立ち上がりません。

> jhon1998 talk % rails s
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:66:
> warning: already initialized constant Net::ProtocRetryError
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68:
> warning: previous definition of ProtocRetryError was here
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:206:
> warning: already initialized constant Net::BufferedIO::BUFSIZE
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:214:
> warning: previous definition of BUFSIZE was here
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/protocol.rb:503:
> warning: already initialized constant Net::NetPrivate::Socket
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:541:
> warning: previous definition of Socket was here
> => Booting Puma
> => Rails 6.0.6.1 application starting in development 
> => Run `rails server --help` for more startup options Puma starting in single mode...
> * Version 3.12.6 (ruby 2.6.5-p114), codename: Llamas in Pajamas
> * Min threads: 5, max threads: 5
> * Environment: development
> * Listening on tcp://localhost:3000 Use Ctrl-C to stop Started GET "/" for ::1 at 2023-09-22 22:41:30 +0900
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:
> [BUG] Segmentation fault at 0x0000000000000000 ruby 2.6.5p114
> (2019-10-01 revision 67812) [x86_64-darwin22]
> 
> -- 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:0050 p:---- s:0367 e:000366 CFUNC  :connect c:0049 p:0674 s:0355 e:000354 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97
> [FINISH] c:0048 p:---- s:0340 e:000339 CFUNC  :new c:0047 p:0104
> s:0335 e:000334 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/mysql
> c:0046 p:0024 s:0328 e:000327 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0045 p:0021 s:0324 e:000323 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0044 p:0016 s:0320 e:000319 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0043 p:0014 s:0314 e:000313 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0042 p:0012 s:0308 e:000306 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0041 p:0025 s:0302 e:000298 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0040 p:0138 s:0295 e:000294 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstr
> c:0039 p:0011 s:0289 e:000288 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_handling.rb:22
> c:0038 p:0004 s:0285 e:000284 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_handling.rb:18
> c:0037 p:0012 s:0281 e:000280 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/migration.rb:562
> c:0036 p:0009 s:0275 e:000274 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/callbacks.rb:2
> c:0035 p:0029 s:0272 e:000271 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/callbacks.rb:101
> c:0034 p:0010 s:0263 e:000262 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/callbacks.rb:2
> c:0033 p:0018 s:0256 e:000255 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/executor.rb:14
> c:0032 p:0032 s:0248 e:000247 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/actionable_exc
> c:0031 p:0024 s:0242 e:000241 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/debug_exceptio
> c:0030 p:0008 s:0231 e:000230 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:132
> c:0029 p:0077 s:0225 e:000224 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:28
> [FINISH] c:0028 p:---- s:0215 e:000214 CFUNC  :catch c:0027 p:0007
> s:0210 e:000209 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:17
> c:0026 p:0024 s:0203 e:000202 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/show_exception
> c:0025 p:0042 s:0196 E:001f10 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:37
> c:0024 p:0009 s:0186 e:000185 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:26
> c:0023 p:0004 s:0183 e:000182 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80 c:0022 p:0013 s:0180 e:000179 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28 c:0021 p:0012 s:0174 e:000173 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80 c:0020 p:0041 s:0169 e:000168 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:26
> c:0019 p:0041 s:0163 e:000162 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13
> c:0018 p:0053 s:0158 e:000157 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/remote_ip.rb:8
> c:0017 p:0039 s:0152 e:000151 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/request_id.rb:
> c:0016 p:0091 s:0146 e:000145 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/method_override.rb:24 c:0015 p:0020 s:0140 e:000139 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/runtime.rb:22
> c:0014 p:0033 s:0130 e:000129 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/cache/strategy/local_ca
> c:0013 p:0018 s:0123 e:000122 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/executor.rb:14
> c:0012 p:0083 s:0115 e:000114 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/static.rb:126
> c:0011 p:0008 s:0107 e:000106 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/sendfile.rb:110
> c:0010 p:0054 s:0095 e:000094 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/host_authoriza
> c:0009 p:0149 s:0089 e:000088 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/webpacker-4.3.0/lib/webpacker/dev_server_proxy.rb:23
> c:0008 p:0011 s:0084 e:000082 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-proxy-0.7.6/lib/rack/proxy.rb:87
> c:0007 p:0020 s:0078 e:000077 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/engine.rb:527
> c:0006 p:0026 s:0072 e:000071 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/configuration.rb:227 c:0005 p:0293 s:0067 e:000066 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:706
> c:0004 p:0029 s:0040 e:000039 METHOD
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:476
> c:0003 p:0065 s:0026 e:000025 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:334
> c:0002 p:0127 s:0016 e:000015 BLOCK 
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135 [FINISH] c:0001 p:---- s:0003 e:000002 (none) [FINISH]
> 
> -- Ruby level backtrace information ---------------------------------------- /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in
> `block in spawn_thread'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:334:in
> `block in run'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:476:in
> `process_client'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:706:in
> `handle_request'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/configuration.rb:227:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/engine.rb:527:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-proxy-0.7.6/lib/rack/proxy.rb:87:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/webpacker-4.3.0/lib/webpacker/dev_server_proxy.rb:23:in
> `perform_request'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/host_authorization.rb:103:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/static.rb:126:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/executor.rb:14:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/runtime.rb:22:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.7/lib/rack/method_override.rb:24:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/request_id.rb:27:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/remote_ip.rb:81:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:26:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in
> `tagged'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28:in
> `tagged'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in
> `block in tagged'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:26:in
> `block in call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.6.1/lib/rails/rack/logger.rb:37:in
> `call_app'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:17:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:17:in
> `catch'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:28:in
> `block in call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/middleware.rb:132:in
> `call_app'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/executor.rb:14:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/callbacks.rb:26:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/callbacks.rb:101:in
> `run_callbacks'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/actionpack-6.0.6.1/lib/action_dispatch/middleware/callbacks.rb:27:in
> `block in call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/migration.rb:562:in
> `call'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_handling.rb:189:in
> `connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_handling.rb:221:in
> `retrieve_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1125:in
> `retrieve_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:437:in
> `connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:593:in
> `checkout'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:871:in
> `acquire_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:910:in
> `try_to_checkout_new_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in
> `checkout_new_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:887:in
> `new_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/mysql2_adapter.rb:24:in `mysql2_connection'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.6.1/lib/active_record/connection_adapters/mysql2_adapter.rb:24:in `new'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `initialize'
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `connect'
> 
> -- Machine register context ------------------------------------------------  rax: 0x000000010d520045 rbx: 0x0000000000000001 rcx: 0x000000010d520ba4 
> rdx: 0x0000000000000000 rdi: 0x00007fca9b2f3a00 rsi:
> 0x0000000000000020  rbp: 0x0000000309f85ea0 rsp: 0x0000000309f859a0 
> r8: 0x0000000000000001   r9: 0x00007fca7b834148 r10:
> 0x000000010c4dc8a0 r11: 0x00007fca9b32c6d0  r12: 0x00007fca7b33ee88
> r13: 0x0000000000000008 r14: 0x00006000006f77b0  r15:
> 0x00007fca91517548 rip: 0x000000010d520045 rfl: 0x0000000000000203
> 
> -- C level backtrace information ------------------------------------------- /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_vm_bugreport+0x82)
> [0x10b3a4ae2]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_bug_context+0x1d8)
> [0x10b214af8]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(sigsegv+0x51)
> [0x10b315fd1] /usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d)
> [0x7ff8127645ed]
> /usr/local/Cellar/mysql/8.1.0/lib/libmysqlclient.22.dylib(mysql_options+0x58f)
> [0x10d520045]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.5/lib/mysql2/mysql2.bundle(rb_mysql_connect+0x1af) [0x10c4dca4f]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(call_cfunc_8+0x3d)
> [0x10b39ef7d]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_call_cfunc+0x14f)
> [0x10b39914f]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_exec_core+0x2cf5)
> [0x10b3822c5]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_vm_exec+0x995)
> [0x10b394505]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_funcallv+0xfb)
> [0x10b38aacb]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_class_s_new+0x29)
> [0x10b298219]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_call_cfunc+0x14f)
> [0x10b39914f]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_exec_core+0x2cf5)
> [0x10b3822c5]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_vm_exec+0x995)
> [0x10b394505]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(catch_i+0x5e)
> [0x10b3a0d8e]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_catch_protect+0xd7)
> [0x10b390857]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_f_catch+0x57)
> [0x10b391067]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_call_cfunc+0x14f)
> [0x10b39914f]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(vm_exec_core+0x2ad9)
> [0x10b3820a9]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(rb_vm_exec+0x995)
> [0x10b394505]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(thread_do_start+0x2ab)
> [0x10b35a54b]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(thread_start_func_2+0x1fd)
> [0x10b35a03d]
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/libruby.2.6.dylib(thread_start_func_1+0x125)
> [0x10b359c85]
> /usr/lib/system/libsystem_pthread.dylib(_pthread_start+0x7d)
> [0x7ff8127371d3]
> 
> -- Other runtime information -----------------------------------------------
> 
> * Loaded script: bin/rails
> 
> * Loaded features:
> 
>     0 enumerator.so
>     1 thread.rb
>     2 rational.so
>     3 complex.so
>     4 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin22/enc/encdb.bundle
>     5 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin22/enc/trans/transdb.bundle
>     6 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin22/rbconfig.rb
>     7 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/compatibility.rb
>     8 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/defaults.rb
>     9 /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/deprecate.rb
> 10
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/errors.rb
> 11
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/unknown_command_spell_checker.rb    12
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/exceptions.rb
> 13
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/basic_specification.rb

> 2367
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.6.1/lib/active_support/current_attributes.rb
> 2368
> /Users/jhon1998/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/web-console-4.2.0/lib/web_console/whiny_request.rb
> 
> [NOTE] You may have encountered a bug in the Ruby interpreter or
> extension libraries. Bug reports are welcome. For details:
> https://www.ruby-lang.org/bugreport.html
> 
> [IMPORTANT] Don't forget to include the Crash Report log file under
> DiagnosticReports directory in bug reports.
> 
> zsh: abort      rails s 

rubyやrailsの再インストールを行なってもダメでした。
他に方法はありませんか?
よろしくお願いします。

1 件の回答 1

1
> [BUG] Segmentation fault at 0x0000000000000000 ruby 2.6.5p114

上記のメッセージはCレベルで致命的なエラーが発生したと事を示します。これが発生するのは、Ruby本体、または、Cで書かれた拡張ライブラリ(今回はmysql2)のどちらかにバグがあることを示します。また、Ruby本体と拡張ライブラリのどちらかのバージョンが古い場合、未対応な組合せであるために発生することもあります。

ほとんどの場合、このようなバグは既に報告され、最新バージョンでは修正されています。全てを最新バージョンにすることで問題は解決する可能性が高いです。もし、全てを最新バージョンにしてもエラーになるようであれば、Ruby本体か拡張ライブラリのバグの可能性が高いため、開発側にバグを報告して、修正を依頼することになります。

さて、現在の状況は、エラーメッセージから見る限り次のバージョンと思われます。

  • Ruby 2.6.5 (2.6系は既にサポート終了)
  • Ralis 6.0.6.1 (6.0系は既にサポート終了)
  • mysql2 0.5.5 (最新)

Ruby 2.6系の最新バージョンである2.6.10にすることで発生しなくなる可能性もありますが、既にサポートが終了しており、なおらない可能性もあります。また、mysql2側が新しすぎてサポート切れのRuby 2.6系に対応していない可能性もあり、バージョンを落とせば、発生しなくなる可能性もあります。ただ、これらはあくまでもなんとか動かすための方法であり、サポートされているバージョンにアップデート、つまり、Rubyは3.0系以上、Railsは6.1系以上にあげないと、どこかでまた同じ問題が出る可能性があります。

まとめると、次のような流れになるかと思います。

  1. Rubyを2.6.10に上げてみる。
  2. 1.でうまくいかないなら、mysql2のバージョンを一つ一つ落としていく。(Gemfileでバージョン指定する)
  3. どちらにしても、最終的には、Rubyを3.0系以上、Railsを6.1系以上にアップデートする。(mysql2は最新バージョンに戻す)

最初の1.と2.ではどうしても動かない場合は、mysql2で発生しているバグなので、データベースはsqlit3にすることで動作確認を行うようにした状態で3.を実施するしか無いかと思います。3.の状態にしても発生するというのであれば、バグを持っている可能性が高いmysql2のissuesにバグ報告をしてください。

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。