Uninitialized constant BooksController::Books

hi new to rails …
wat does it means…
uninitialized constant BooksController::Books

/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
const_missing' app/controllers/books_controller.rb:5:inindex’

Newone One wrote:

hi new to rails …
wat does it means…
uninitialized constant BooksController::Books

/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
const_missing' app/controllers/books_controller.rb:5:in index’

Most likely you have written Books.find instead of Book.find.


Rails Wheels - Find Plugins, List & Sell Plugins -
http://railswheels.com

Mark Reginald J. wrote:

Newone One wrote:

hi new to rails …
wat does it means…
uninitialized constant BooksController::Books

/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
const_missing' app/controllers/books_controller.rb:5:in index’

Most likely you have written Books.find instead of Book.find.


Rails Wheels - Find Plugins, List & Sell Plugins -
http://railswheels.com

thanks alot :)…i made it right…

Im newbie and have the same problem too.

After I manually change all the Books.find to Book.find, it prompt me
the same error, so I restart the server, clear private data(in
firefox) and refresh the page, the error message is,
“Ruby on Rails application could not be started”
“no such file to load — book (MissingSourceFile)”.

what should I do?

Shirley, your model is probably called app/models/books.rb, change
that too.


Ryan B.
Freelancer