0
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 3 years have passed since last update.

[自分メモ] Railsのコマンド関連のメモ

Posted at

概要

最近Railsを初めて触ったので、Railsコマンドを忘れないようにメモします。

コマンド

API作成

rails new sample --api

Webサーバー起動

rails server

コントローラ作成

rails g controller sample

モデル作成

rails g model sample

コントローラ削除

rails destroy sample

ルーティング表示

rails routes

DB

作成

rails db:create

マイグレーション

rails db:migrate

ロールバック

rails db:rollback

gemのインストール

bundle install

テスト実行(RSpec)

bundle exec rspec

参考文献

Railsで超簡単API
【Rails】Rails6でAPIモードの環境構築をしっかりやる

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?