Member-only story

Rails Generators - App Creation

Steven Klavins
3 min readFeb 25, 2021

I have recently been getting back into some Rails development so I’ve decided to make a short series of reference blogs on common generators.

Note: you can list Rails generators with the following command.

rails -h 
Screen shot of helper

To the right, you will have a basic explanation of what each flag does, however, it is my hope through this blog I can provide a little more context on independent use cases.

One important thing to note about this helper’s flags is you have the ability to selectively exclude items. For example, looking at the screenshot below we could independently exclude TurboLinks with --skip-turbolinks however if we included the -J flag when generating our app it will exclude TurboLinks, JavaScript, and Jbuilder collectively as they are sub-items.

Generating a new app

rails new app-name Creates a rails app with default configurations (a SQLite3 database and so on) it is at this stage you will name your app (opposed to app-name you could call it something like "my-cool-blog")

Generating a new app with a database of your choice

rails new app-name --database=postgresqlUtilizing the database flag you can set the Rails configuration to use a database of your choice…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Steven Klavins
Steven Klavins

Written by Steven Klavins

Hi, I’m Steven, most call me Steve! I’m a programmer, musician, and artist. This blog contains various tutorials and posts related to software development.

No responses yet

Write a response