goals do
goal "Create a new rails application"
end
steps do
step do
message "In the termine, go to a folder where we want to put the source code. There run"
console "rails new suggestotron"
end
step do
message "a folder `suggestotron` with a lot of files and folders was created. Let's look inside"
console "cd suggestotron/"
end
step do
message "In this folder we will run commands later, and we want to start an editor. for example VS Code:"
console "code ."
end
message <<-MARKDOWN
In VS Code, you can see the files on the left hand side
it should show the folders of your app in a tree structure:
![Screenshot of your files](img/vscode_project_as_folder.png)
MARKDOWN
message <<-MARKDOWN
You can see that `rails new` created a lot folders and
files. The ones we want to focus on today are:
MARKDOWN
table class: 'bordered' do
tr {
th "File/Folder"
th "Purpose"
}
tr {
td "app/"
td "Contains the controllers, models, and views for your application. You will do most of your work here."
}
tr {
td "config/"
td "Configure your application's runtime rules, routes, database, and more."
}
tr {
td "db/"
td "Shows your current database schema, as well as the database migrations."
}
tr {
td "public/"
td "The only folder shown to the world as-is. If you put files in here, they will be served directly on the web without any processing by Rails. Us it for your sites logo or robots.txt file"
}
end
message "There is a lot more that in your Rails app. Probably enough to fill a book, so we're going to ignore them for now."
end
next_step "add_the_project_to_a_git_repo"