Review the code

Now we’ll review some of the generated folders and files and more or less understand their role in your app.

On the right side you can see a list of some of the folders and files that the rails new command automatically generated for us. The folders and files we’re interested in today are marked in an orange rectangle.

Folder/file name Role
app This is the most important folder in your app. Most of the code is there.
app/assets This folder contains static files. These are files that the Rails server serves to the browser without manipulating them first. Such files can be images (they'll be placed in the images folder), files containing CSS code (they'll be placed in the stylesheets folder), or JavaScript files which we won't talk about today.
app/controllers This folder contains code files that are written in the ruby language. Most of your app's logic (how the app works and what it does) is there. Currently your app doesn't do a lot, so all you'll see there is a little file called application_controller.rb. If you open this file in your text editor you'll see that it contains very little code.
app/models This folder contains all your models. You still don't know what a model is, but you'll learn about it in the 4th step.
app/views This folder contains all of your app's HTML code.
db This folder contains all of the data in your app. Currently there's no data in there, but after you complete the next step it will contain all of your ideas!
public/index.html This file exists in your app only if you're using Rails 3. If you're using Rails 4 you won't see it (and that's fine!). This file contains the HTML code used to generate the "Welcome aboard" page you've seen earlier.
Gemfile This file contains a list of external code libraries that your app uses. In step 6 you'll learn how to use external code libraries.