Ruby / Rails - A refresher reference for me because I forget... create project generate scaffold scaffolding migrate db


/ Published in: Ruby
Save to your folder(s)

Ruby / Rails - A refresher reference for me because I forget how to do this... create project generate scaffold scaffolding migrate db start server


Copy this code and paste it in your HTML
  1. A refresher reference for me because I forget how to do this...
  2.  
  3. #1:
  4. create a new Ruby on Rails project, run this inside the folder where you want the project:
  5.  
  6. rails newproject
  7.  
  8. then cd into your new project folder
  9.  
  10. cd newproject
  11.  
  12.  
  13.  
  14. #2:
  15. generate the Scaffolding for your content types, run this inside your rails project folder
  16.  
  17. ruby script/generate scaffold Color name:string shade:string cmyk:string
  18.  
  19.  
  20.  
  21.  
  22. #3:
  23. rake together all the classes, migrate them to a database structure
  24.  
  25. rake db:migrate
  26.  
  27.  
  28.  
  29.  
  30. #4:
  31. start the rails server
  32.  
  33. script/server

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.