Specify the version when launching a new project. It's the beginning of everything, so I'll keep a good record.
Create an application named tabi.
Terminal.
% cd ~/projects
% rails _6.0.0_ new tabi -d mysql
#......Wait for a while to load.
If successfully is displayed, it is successful.
% cd tabi
Go to the new tabi app.
Before creating the database, change the encoding settings listed in database.yml.
config/database.yml
efault: &default
adapter: mysql2
#encoding:utf8mb4 ← Edit this to utf8
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password:
socket: /tmp/mysql.sock
Next, create the database.
% rails db:create
If Created is displayed, it is successful.
Created database 'tabi_development'
Created database 'tabi_test'
It was created. The application base is now complete.
Finally, I'm using GitHub, so I'll work with it. Commit from your desktop and you're done.
I am a beginner in programming, but I am posting an article in the hope that it will help people who are similarly troubled. This time, I posted it as a record of the first work for personal development. See you next time ~
Recommended Posts