原书写的是
ruby script/generate scaffold product Admin
但是本人的系统是 苹果的lion ,再看版本
ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
rails -v
Rails 3.1.1
gem -v
1.8.11
rails generate scaffold product Admin
Missing type for attribute 'Admin'.
Example: 'Admin:string' where string is the type.
最终的写法是
rails generate scaffold product 'Admin:string'
阅读(339) | 评论(0) | 转发(0) |