Learning ROR: Part 5 – Rails Project Directory Structure

Rails, Ruby, Ruby on Rails 3 Your Views ,

In our previous post, we created a new Project and Rails created the directories on our behalf. Before we move further, I would recommend Beginners to look into an awesome info-graphic which I recently came across, this helps us to understand the different folders used in Rails Project,

Note: A minor correction in the below info-graphic. the CSS, images and Javascript files in Public directory are moved into “assets” folder within “app” directory.

Added to the above Info-graphic, I am also listing the various project directories (from Micheal Hartl RailsTutorial) and their uses below,

File/Directory Purpose
app/ Core application (app) code, including models, views, controllers, and helpers
app/assets Applications assets such as cascading style sheets (CSS), JavaScript files, and images
config/ Application configuration
db/ Database files
doc/ Documentation for the application
lib/ Library modules
lib/assets Library assets such as cascading style sheets (CSS), JavaScript files, and images
log/ Application log files
public/ Data accessible to the public (e.g., web browsers), such as error pages
script/rails A script for generating code, opening console sessions, or starting a local server
test/ Application tests
tmp/ Temporary files
vendor/ Third-party code such as plugins and gems
vendor/assets Third-party assets such as cascading style sheets (CSS), JavaScript files, and images
README.rdoc A brief description of the application
Rakefile Utility tasks available via the rake command
Gemfile Gem requirements for this app
Gemfile.lock A list of gems used to ensure that all copies of the app use the same gem versions
config.ru A configuration file for Rack middleware
.gitignore Patterns for files that should be ignored by Git

3 Responses to Learning ROR: Part 5 – Rails Project Directory Structure

  1. Steve Lim

    thanks for the summary!

     
    • Santhosh Vijay

      welcome @steve_lim:disqus 🙂

       
  2. Prasanth

    where is bin directory ???

     

Add a Comment

%d bloggers like this: