snippetbashTip
rails new — Create a new Rails application. More information: <https://guides.rubyonrails.org/command_line.html#
Viewed 0 times
rails newcreatecommandrailsnewclimoreapplication
Problem
How to use the
rails new command: Create a new Rails application. More information: <https://guides.rubyonrails.org/command_line.html#rails-new>.Solution
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 blogCreate a Rails app with API-only configuration:
rails new {{app_name}} --apiCreate a Rails app with
postgresql as the database:rails new {{app_name}} {{[-d|--database]}} postgresqlCreate a Rails app without generating JavaScript files:
rails new {{app_name}} {{[-J|--skip-javascript]}}Display help:
rails new {{[-h|--help]}}Code Snippets
Create a Rails app named `blog` in the current directory
rails new blogCreate a Rails app with API-only configuration
rails new {{app_name}} --apiCreate a Rails app with `postgresql` as the database
rails new {{app_name}} {{[-d|--database]}} postgresqlCreate a Rails app without generating JavaScript files
rails new {{app_name}} {{[-J|--skip-javascript]}}Display help
rails new {{[-h|--help]}}Context
tldr-pages: common/rails new
Revisions (0)
No revisions yet.