1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Railsアプリでデータベースを作成する方法

Posted at

結論

ターミナルで以下を入力する

$ rails db:create

これでデータベースを作成できます。

成功した場合

Created database 'db/development.~~~~'
Created database 'db/test.~~~'

データベースが作成されたと表示されます。

ちなみに 

rails db:create を2回以上打ち込むと

Created database 'db/development.~~~~'already exists
Created database 'db/test.~~~'already exists

既にデータベースが存在しているとエラーが表示されます。

以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?