1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/rails-new.md

25 lines
563 B
Markdown
Raw Normal View History

2025-01-26 07:00:07 -08: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:
`rails new {{app_name}} {{[-d|--database]}} postgresql`
2025-01-26 07:00:07 -08:00
- Create a Rails app without generating JavaScript files:
`rails new {{app_name}} {{[-J|--skip-javascript]}}`
2025-01-26 07:00:07 -08:00
- Display help:
`rails new {{[-h|--help]}}`