In this post we are going to briefly go over how we create a new Rails 7 app.
Since this tutorial is for Rails 7 with Tailwind, the command I’m going to recommend is
rails new APP_NAME --css tailwind -d postgresql
railsis the Rails CLI (command line interface) tool
newtells the Rails CLI that we want to generate a new application
APP_NAMEis, well, your app name
--css tailwindis an optional parameter that tells Rails we want to use Tailwind for styles
-d postgresqlis an optional parameter that tells Rails we want to use the PostgreSQL to persist our data
I normally always override the default SQLite database, this is just a personal preference.
After generating your new Rails app, you’ll need to cd into your new app and create your database.
Next up we run.
And then you can start up your development server.
Now you can navigate to your browser to
localhost:3000, and if everything has gone according to plan, you should see the Rails default index page.