Ruby on Rail学习笔记

说明:只针对Windows8.1
Windows下,上rubyinstaller上下载最新的railsinstaller包含Ruby2.1的,然后更新gem
用命令:
 
    
  1. gem update --system
然后找好位置,使用命令:
 
     
  1. rails new demo --skip-test-unit
注意,开启rails服务器只要进入项目目录使用命令:
 
     
  1. rails server
即可,不需要bin/rails server
创建数据库使用
 
    
  1. rake db:create 命令
不要再用gem装sqlite3了,因为railsinstaller已经安了sqlite
 
     
  1. $ bin/rails g scaffold person name:string bio:text birthday:date



来自为知笔记(Wiz)


转载于:https://www.cnblogs.com/hitnoah/p/4187086.html

你可能感兴趣的:(Ruby on Rail学习笔记)