1. Create new projects
- 检查版本
ruby -v
rails -v
- 创建文件夹
mkdir Workbook
cd Workbook
- 创建rails框架专案
rails new first_app
cd first_app
bundle install
打开rails s
http://localhost:3000 - 保存
git init
git status
git add .
git commit -m "Added all the things"
2. Create scaffold
- 使用scaffold快速搭建topic
rails generate scaffold topic title:string description:text
rake db:migrate
重开rails s
http://localhost:3000/topics - 保存
git add .
git commit -m "add README"