Creating a New Rails Project

Learn to create a basic Rails application and go through the structure that Rails sets up for us.

We'll cover the following

Creating a new project

Rails comes equipped with scripts called generators that will automatically create everything you need to start working on a new project. To create a new application, you must invoke the new generator, which will act as the foundation for your project. This generator will save you time and effort by ensuring that you will write much less code.

To use the new generator we will run the following command:

rails new my_project

This will set up a new project in the my_project directory and set up the application structure for Rails.

Let’s take a look at exactly what this command created.

Project file/folder structure (incomplete)
Project file/folder structure (incomplete)

Get hands-on with 1400+ tech skills courses.