Common Commands for Rails: (Rails version:4.2.0)
1. New Rails project, rails new project name –skip-bundle (this is to skip the bundle dependency check)
2. New controller and Model: Rails generate (g) model name (singular) field: Properties ...
Rails Generate (g) Controller controllers name (same as model name)
3. Data migration: Bin/rake db:migrate
4.rails Console (c) can enter Rails ' main console (similar to IRB) where database tables can be manipulated
5. You can add a field to a table in the database: Rails g (generate) Add_status_to_ model name (plural)
6. In the bin directory, there is bundle,rails,rake,setup. Generally used more is the rails command under the
7.bin/rails server (s) startup
8.bin/rake Db:create Building a database
9. Use of scaffolding bin/rails g (generate) Scaffold model name (singular) field: Properties ...
10.Rails provides bin/rake stats can know how many lines of code have been written