LoginSignup
0
0

More than 3 years have passed since last update.

Ruby on Rails アプリケーション新規作成コマンド

Posted at

アプリケーション新規作成

アプリケーションを作成するコマンドは
rails new アプリケーション名

例:
rails new myapp

オプション指定

アプリケーション新規作成時にオプションを指定することができる。

Rails バージョン指定

バージョンを指定してアプリケーションを作成する場合は
rails バージョン new アプリケーション名

例:
rails _5.2.3_ new myapp

データベース指定

データベースを指定してアプリケーションを作成する場合は
rails new アプリケーション名 -d データベースの種類

例:
rails new myapp -d mysql

データベースの指定がない場合、データベースはデフォルトのsqliteとなる。

テストを作成しない

テストを作成せずにアプリケーションを作成する場合は
rails new アプリケーション名 -T

.gitignoreファイルを作成しない

.gitignoreファイルを作成せずにアプリケーションを作成する場合は
rails new アプリケーション名 -G

その他のオプション

上記以外にも様々なオプションが存在する。
次のコマンドでヘルプを表示し、全てのオプションコマンドとその内容を確認できる。
rails new -h

0
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
0
0