2017-11-28 04:19:31 +00:00
|
|
|
# rails
|
|
|
|
|
2017-11-29 04:01:29 +00:00
|
|
|
> A server-side MVC framework written in Ruby.
|
2021-09-13 09:21:21 +01:00
|
|
|
> Some subcommands such as `rails generate` have their own usage documentation.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://guides.rubyonrails.org/command_line.html>.
|
2017-11-28 04:19:31 +00:00
|
|
|
|
|
|
|
- Create a new rails project:
|
|
|
|
|
2017-11-29 03:54:55 +00:00
|
|
|
`rails new "{{project_name}}"`
|
2017-11-28 04:19:31 +00:00
|
|
|
|
2017-11-29 03:54:55 +00:00
|
|
|
- Start local server for current project on port 3000:
|
2017-11-28 04:19:31 +00:00
|
|
|
|
|
|
|
`rails server`
|
|
|
|
|
2017-11-29 03:54:55 +00:00
|
|
|
- Start local server for current project on a specified port:
|
2017-11-28 04:19:31 +00:00
|
|
|
|
2017-11-29 03:54:55 +00:00
|
|
|
`rails server -p "{{port}}"`
|
2017-11-28 04:19:31 +00:00
|
|
|
|
2021-05-20 21:13:41 +01:00
|
|
|
- Open console to interact with application from command-line:
|
2017-11-28 04:19:31 +00:00
|
|
|
|
2017-11-28 04:30:14 +00:00
|
|
|
`rails console`
|
2017-11-29 03:54:55 +00:00
|
|
|
|
|
|
|
- Check current version of rails:
|
|
|
|
|
|
|
|
`rails --version`
|