railsの環境構築でbundle installをできなくて困っています。
mysql2のところで、止まってしまい、以下のエラ〜メッセージが出ます。
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. checking for rb_absint_size()... yes checking for rb_absint_singlebit_p()... yes checking for rb_wait_for_single_fd()... yes ----- Cannot find mysql_config at /usr/local/bin/mysql_config ----- *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/ユーザ名/.rbenv/versions/2.6.6/bin/$(RUBY_BASE_NAME) --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/ユーザ名/Taskun/vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/mysql2-0.5.3/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/ユーザ名/Taskun/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.3 for inspection. Results logged to /Users/ユーザ名/Taskun/vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/mysql2-0.5.3/gem_make.out An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: mysql2
エラー文にもある通り、gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'を試しましたが下記のエラーが出ました。
Failed to load /Users/ユーザ名/.gemrc because it doesn't contain valid YAML hash Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. current directory: /Users/ユーザ名/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/ext/mysql2 /Users/ユーザ名/.rbenv/versions/2.6.6/bin/ruby -I /Users/ユーザ名/.rbenv/versions/2.6.6/lib/ruby/2.6.0 -r ./siteconf20200629-3449-1ilbtwa.rb extconf.rb checking for rb_absint_size()... yes checking for rb_absint_singlebit_p()... yes checking for rb_wait_for_single_fd()... yes ----- Cannot find mysql_config at /usr/local/bin/mysql_config ----- *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/ユーザ名/.rbenv/versions/2.6.6/bin/$(RUBY_BASE_NAME) --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/ユーザ名/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/mysql2-0.5.3/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/ユーザ名/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3 for inspection. Results logged to /Users/ユーザ名/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/mysql2-0.5.3/gem_make.out
どうすればいいかわからなくなってしまいました。
どなたかわかればご教示いただければ幸いです。
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。