1.安装ruby,在网站
http://www.rubyonrails.org/down下载ruby for
Windows installer:
2.下载
rubygems,
extract, then run "ruby setup.rb";
3.安装rails
: gem install rails --include-dependencies
4.命令行下输入:ruby -v 和rails -v,测试安装成功与否;
5.rails -d mysql demo,使用mysql数据库
6.在config/database.yml修改你的用户名和相应的密码
7.cd demo
8.rake db:create:all,新建数据库
9.
ruby script/generate scaffold Demo name:string mydate:datetime
10.ruby db:migrate,更新数据表
11.ruby script/server,启动服务器
12.访问:http://localhost:3000/demos