commands.sh

rails

all

A server-side MVC framework written in Ruby. Some subcommands such as `generate` have their own usage documentation.

More info →

Options (2)

-p, --portboolean

Start local server for current project on a specified port

Example: rails server {{[-p|--port]}} "{{port}}"
-v, --versionboolean

Display version

Example: rails {{[-v|--version]}}

Examples (8)

Create a new rails project

rails new "project_name"

Generate a scaffold for a model named Post, predefining the attributes title and body

rails generate scaffold Post title:string body:text

Run migrations

rails db:migrate

List all routes

Start local server for current project on port 3000

Start local server for current project on a specified port

rails server [-p|--port] "port"

Open console to interact with application from command-line

Display version

rails [-v|--version]
made by @shridhargupta | data from tldr-pages