前提・実現したいこと
Ruby on Rails とMysqlの接続がしたいです。
発生している問題・エラーメッセージ
Mysqlと接続するときに、rails db:createと入力すると、以下のメッセージが出てきてしまいます。
(base)Natsuki:last natsukikataoka$ rails db:create /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90: [BUG] Segmentation fault at 0x0000000000000000 ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18] -- 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:0052 p:---- s:0289 e:000288 CFUNC :connect c:0051 p:0565 s:0277 e:000276 METHOD /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90 [FINISH] c:0050 p:---- s:0263 e:000262 CFUNC :new c:0049 p:0105 s:0258 e:000257 METHOD /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/mysql2_adap c:0048 p:0021 s:0251 e:000250 METHOD 425 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser.rb 426 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/shell.rb 427 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor/basic.rb 428 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor/readline.rb 429 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb 430 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/util.rb 431 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/base.rb 432 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb 433 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/command/behavior.rb 434 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/command.rb 435 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/erb.rb 436 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/string/filters.rb 437 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/command/actions.rb 438 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/command/base.rb 439 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb 440 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/version.rb 441 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/optparse.rb 442 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/ostruct/version.rb 443 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/ostruct.rb 444 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/ext/core.rb 445 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/ext/string.rb 446 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/win32.rb 447 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/rake- 531 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/object/duplicable.rb 532 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/object/deep_dup.rb 533 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/object/try.rb 534 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/object/to_query.rb 535 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/object/to_param.rb 536 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/x86_64-darwin18/bigdecimal.bundle 537 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bigdecimal.rb 538 /Users/natsukikataoka/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bigdecimal/util.rb 539 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/date_time/calculations.rb 540 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/xml_mini/rexml.rb 541 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/xml_mini.rb 542 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/array/conversions.rb 543 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/time/acts_like.rb 544 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/duration.rb 545 /Users/natsukikataoka/last/vendor/bundle/ruby/2.7.0/gems/tzinfo-7fff9e8de000-7fffc0000000 r-- /usr/local/Cellar/mysql/8.0.19/lib/libmysqlclient.21.dylib 7fffc0000000-7fffffe00000 r-- /usr/local/Cellar/mysql/8.0.19/lib/libmysqlclient.21.dylib 7fffffe00000-7fffffe01000 r-- /usr/local/Cellar/mysql/8.0.19/lib/libmysqlclient.21.dylib 7ffffff7b000-7ffffff7c000 r-x /usr/local/Cellar/mysql/8.0.19/lib/libmysqlclient.21.dylib [IMPORTANT] Don't forget to include the Crash Report log file under DiagnosticReports directory in bug reports. Abort trap: 6 (base) Natsuki:last natsukikataoka$ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.6.47 Homebrew Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
gemfile には以下が記述されています。
ruby
1gem 'mysql2', '>= 0.4.4'
すごい時間をかけていて困っています。助けてください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/02/07 09:58
2020/02/07 10:00
2020/02/07 10:34
2020/02/07 11:05
2020/02/07 11:55
2020/02/07 13:07
2020/02/07 13:16
2020/02/07 13:34
2020/02/08 08:48
2020/02/13 02:37
2020/02/13 02:52
2020/02/13 06:15