Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

What is the directory structure of a Rails application?

Ayyaz Sheikh

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Whenever a Rails application is created, its helper script creates the entire directory structure for this application. This gives you a consistent hierarchy for every project, so you do not need to know about the working structure for every rails project.

Here, I will discuss some of the major folders in the Rails directory.

Let’s say we have an application called Helloworld. The directory created by the Rails helper command will contain the following folders: app, config, bin, db, lib, log, public, test, tmp, and vendor. Besides these folders, it will contain some other necessary files.

  • app: This organizes your project’s component. It holds the Model-View-Controller (MVC).

  • app/controllers: Whenever a request comes, it hits the controller, and Rails looks into this sub-directory.

  • app/models: This sub-directory holds the classes which implement models of your application.

  • app/views: Here comes your display templates that fill the data, and the controller shows the particular view in response to the request. Other sub-directories of app are /helpers, /jobs, /mailers, /channels, and /assets.

RELATED TAGS

CONTRIBUTOR

Ayyaz Sheikh
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring