Keep track of any errors that occur as you progress through the rails tutorial. The hardware uses MacBook Air, and the development environment uses VScode.
Command to execute
$ rails test
Error that occurs
$ rails test ~abridgement~ ~abridgement~ FATAL: database "tutorial_test" does not exist (ActiveRecord::NoDatabaseError)
This is ** no database! The error is **. When you do rails test, you also need to create a database for ** testing. ** **
Therefore, generate a database with the command.
Command to run to generate the database
$ rails db:create
By the way
$ rake db:create
But you can. You can refer to this article for this. [What is Rails rake? ](Https://qiita.com/SuguruOoki/items/e736b15bbb80eacf66d7) This command will generate a database according to the contents of config / database.yml. #### **`Execution result`** ```python $ rails db:create Created database 'app name_development' Created database 'app name_test'
If you see this, you have successfully generated the database.
If you find it useful, I would be grateful if you could click the ** LGTM button. ** ** Let's do our best to learn Rails together! : raised_hand_tone1: