Rails new demo-D MySQL creates a project using MySQL
Rails g controller welcome creates a new welcome Controller
Rake DB: create creates an empty database based on the configuration
Rails g scaffold person name: String Bio: Text birthday: Date
Rake DB: migrate executes all files under DB/migration (used for database operations)
Rails G model event name: String Description: Text is_public: Boolean capacity: integer creates a event ing of the event object (compared with scaffold, no page for adding, deleting, modifying, and querying is generated)
Rails g migration add_status_to_events creates a migration
# Typical route: it automatically maps the network address/Foo/bar to the Controller.
Bar action of foo
Match ': controller (/: Action (/: ID) (.: Format )'
Rake stats list code count, etc.
Open a rails Console
Rails Console
Rails C
Rails c -- sandbox (open in sandbox)
Start the service
Rails s-p 4000-e Production
All gems used are packaged into the vendor/Cache
Bundle package
List all URLs
Helper, URL, and corresponding Controller
Action
Rake routes