First, use the Rails new command to create the application.
The database uses MySQL. Write -d mysql at the end of the command option 6.0.0 is the version
Terminal % rails _6.0.0_new app name-d mysql
Now you can create a new app.
config/database.yml # encoding:utf8mb4 encoding:Change to utf8 This is to change the save format
Database creation Execute the following to create a database linked with the application
Terminal % rails db:create
OK if it works with rails s