1
4

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.

Ruby on Railsコマンド一覧

Last updated at Posted at 2019-02-23

Railsアプリケーションの作成

$ rails new アプリケーション名

データベースの作成

$ rails db:create

migrateステータスの確認

$ rails db:migrate:status

migrate

$ rails db:migrate

バージョンを指定してmigrate

$ rails db:migrate:up VERSION=2022xxxxxxxxxx 

バージョンを指定してロールバック

$ rails db:migrate:down VERSION=2022xxxxxxxxxx 

コンソールの起動

$ rails c

サーバーの起動

$ rails sever
↓ 短縮系
$ rails s

モデルを作成する

$ rails g model [モデル名][属性名:データ型 属性名:データ型 ...] [オプション名]

コントローラーを作成する

$ rails g controller コントローラー名 [アクション名 アクション名 ...] [オプション]
1
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?