Rails version: 2.1.0
Ruby version: 1.8.6
1. Create project 'oac' with mysql database.
In workspace D:/mydev, run follow command:
rails -d mysql oac
2. Create development, test, production databases.
Change to project directory D:/mydev/oac, run follow command:
Comments: Before run follow command, you should change rails project database config file D:/mydev/oac/config/database.yml.
rake db:create:all
3. Create module users, CRUD users.
ruby script/generate scaffold user username:string password:string photo:string mobile:string phone:string email:string description:string
4. Create table users
rake db:migrate
5. Start web server.
start ruby script/server
6.
ROR第一篇
最新推荐文章于 2024-07-27 06:13:26 发布