2025-03-14 21:59:59 -06:00
|
|
|
# rails new
|
|
|
|
|
|
|
|
|
|
> Create a new Rails application.
|
|
|
|
|
> More information: <https://guides.rubyonrails.org/command_line.html#rails-new>.
|
|
|
|
|
|
|
|
|
|
- Create a Rails app named `blog` in the current directory:
|
|
|
|
|
|
|
|
|
|
`rails new blog`
|
|
|
|
|
|
|
|
|
|
- Create a Rails app with API-only configuration:
|
|
|
|
|
|
|
|
|
|
`rails new {{app_name}} --api`
|
|
|
|
|
|
|
|
|
|
- Create a Rails app with `postgresql` as the database:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`rails new {{app_name}} {{[-d|--database]}} postgresql`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a Rails app without generating JavaScript files:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`rails new {{app_name}} {{[-J|--skip-javascript]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`rails new {{[-h|--help]}}`
|