新手问问题,照抄《Ruby on Rails实践》中的程序的问题,多谢
book_controller.rb中写
class BookController < ApplicationController
scaffold :book
end
运行http://127.0.0.1:3000/book/new
显示
NameError in BookController#new
uninitialized constant Book
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
……
This error occured while loading the following files:
book.rb
Request
Parameters: None
Show session dump
---
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
请问是怎么回事,多谢多谢