mysqladmin –u root create dbName 创建mysql数据库.
rake db:migrate 执行数据迁移(将未实施的迁移任务实施到数据库上).(rubymine->Ctrl+Shift+F10)
ruby script/generate model modelName 创建模型对象(rubymine—> Ctrl+Alt+g,m).
ruby script/generate controller controllerName 创建应用程序控制器 (rubymine—> Ctrl+Alt+g,c).
ruby script /server 启动本地WeB rick 服务器.
ruby script /generate migration migrationName 创建迁移任务 (rubyMine-->Ctrl+Alt+g,i).
ruby1.2中快速搭建脚手架
class Controller <ApplicationController scaffold :product end
rake db:sessions:clear 清空session