0
1

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.

Ruby on Rails ディレクトリ構造

Last updated at Posted at 2021-03-14

【Ruby on Rails ディレクトリ構造】

Ruby on RailsでのWebアプリケーション開発をする時に
ディレクトリ構造の理解が必要なため備忘録としてまとめました。

Webアプリケーションを開発する時は、app、config、dbをよく使います。

それぞれのディレクトリ構造の理解をしよう。

app:MVCのアプリケーションに関するものを管理
bin:Webアプリケーション起動時に使用するスクリプトファイルを管理
config:ルーティングやDBの設定ファイルを管理
db:DB関連のマイグレーションスクリプトやシートデータを管理
lib:全体で共有する必要のあるライブラリを管理
log:Webアプリケーション実行時のログファイルを管理
public:静的なファイルやページなどのリソースを管理
test:テスト用のコードファイルやデータなどを管理
tmp:一時的な情報を管理
vendor:第三者によって開発されたコードを配置する

Webアプリケーション直下に生成されるファイル

.gitignore:gitのバージョン管理対象から外すファイル
.ruby-version:Rubyのバージョンを管理するファイル
Gemfile:Railsで使用するGemパッケージの設定ファイル
Gemfile.lock:Gemパッケージの依存関係を管理するファイル
README.md:起動実行手順の説明用のファイル
Rakefile:Rakeコマンドの実行を管理するファイル
config.ru:Rackがrailsサーバー起動に使用する設定ファイル
package.json:npmを使用する場合に必要なファイル

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?