Creating a new Rails project sets up all the files and folders you need to start building a web app quickly.
Rails new project generation
rails new project_name [options]
project_name is the folder and app name you choose.
You can add options like --database=postgresql to pick your database.
blog_app with default settings.rails new blog_app
shop using PostgreSQL as the database.rails new shop --database=postgresql
portfolio but skips creating test files.rails new portfolio --skip-test
This command creates a new Rails project called sample_app using SQLite3 as the database. It sets up all folders, files, and default configurations so you can start coding your app immediately.
rails new sample_app --database=sqlite3
You need Ruby and Rails installed before running rails new.
The command creates a folder with your project name and fills it with files.
You can add many options to customize your new app, like skipping tests or choosing a different JavaScript setup.
rails new quickly sets up a new Rails app with all needed files.
You choose the app name and can add options for database and features.
After running it, you get a ready-to-use project folder to start coding.