1. 在Gemfile中添加: gem 'nifty-generators' 2. rails g nifty:layout 3. rails g nifty:scaffold survey name:string