用 Navicat 建了个表 students
id INTEGER 0 0 非空 主键自增
name TEXT 0 0 非空
shuxue INTEGER 0 0 非空
然后>>rails generate scaffold Student 之后再生成的几个页面中我一点 Create Student 就显示
SQLite3::ConstraintException in StudentsController#create students.name may not be NULLRails.root: C:/Documents and Settings/Administrator/myweb
什么叫做我的 students.name 不一定为空啊?这 sqlite3 用着真头疼 还弄了个弱类型 我的 mysql 还连不上 我的环境只支持 mysql6.0 但是 6.0 相对太新还有 bug
求救 求救=。=