tldr/pages/common/rails.md

24 lines
419 B
Markdown
Raw Normal View History

2017-11-28 07:19:31 +03:00
# rails
2017-11-29 07:01:29 +03:00
> A server-side MVC framework written in Ruby.
2017-11-28 07:19:31 +03:00
- Create a new rails project:
2017-11-29 06:54:55 +03:00
`rails new "{{project_name}}"`
2017-11-28 07:19:31 +03:00
2017-11-29 06:54:55 +03:00
- Start local server for current project on port 3000:
2017-11-28 07:19:31 +03:00
`rails server`
2017-11-29 06:54:55 +03:00
- Start local server for current project on a specified port:
2017-11-28 07:19:31 +03:00
2017-11-29 06:54:55 +03:00
`rails server -p "{{port}}"`
2017-11-28 07:19:31 +03:00
2017-11-29 06:54:55 +03:00
- Open console to interact with application from command line:
2017-11-28 07:19:31 +03:00
`rails console`
2017-11-29 06:54:55 +03:00
- Check current version of rails:
`rails --version`