途中までは下記の記事を参考に
https://qiita.com/yuitnnn/items/b45bba658d86eabdbb26
https://webird-programming.tech/archives/194
途中までは問題なく進めることはできたのですが、
bundle install --path vendor/bundle
の段階で躓きました。そんな時は下記のコードを入力してからもう一度トライ!
$bundle config --local build.mysql2 "--with-cppflags=-I/usr/local/opt/openssl/include"
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
Webpackerのダウンロードも忘れずに!
bundle exec rails webpacker:install
webpackerをインストールしないとrails 6はどうやらうまくいかないようです。
あとは
bundle exec rails db:createをしてmysqlを使えるようにしましょう!