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?

【Rails】アプリケーションの新規作成

Posted at

記事概要

フレームワークRuby on RailsでRubyのアプリケーションを新規作成する方法について、まとめる

前提

  • Ruby on RailsをPCにインストールしている

手順

  1. rails newコマンドで雛形を作成する
    # 新規アプリを作成するディレクトリに移動
    % cd ~/[新規アプリ作成ディレクトリ]
    
    # Railsの新規アプリを作成
    % rails new [アプリ名]
    
  2. VSCodeで新しいアプリのフォルダを開き、さまざまなディレクトリやファイルが作成されていることを確認する

rails newコマンド

バージョン指定

Railsのバージョンを指定できる

# Railsのバージョン7.0.0を指定してアプリを作成
% rails _7.0.0_ new [アプリ名]

-dオプション

データベースの種類を指定できる

% rails new [アプリ名] -d データベース名

# MySQLを指定
% rails new [アプリ名] -d mysql

Ruby on Railsまとめ

備考

  • バージョン指定でエラーが発生した場合、こちらを参照
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?