Member-only story
Rails Generators - App Creation
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

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…