I created a very simple app with a database table for image file names and tags to be associated with the image. When I generate the scaffolded app it has an error in it. There is an uninitialized constant of the same name as the model class but singular instead of plural. I.E. Model class Photos < ActiveRecord::Base and in the completely generated app I get an error when creating a row in the db for an "uninitialized constant Photo". I can;lt find photo in the generated cod via fgrep. I'm at a loss.
I followed these steps
* rails gallery * cd gallery/ * # create a gallery_development schema using MySQL Query browser * script/generate migration photos * # edit the migration file to create the empty table * rake migrate * # checked the database and "photos" table looks correct * script/generate scaffold photos photos * script.server
Now comes the weird part when I go to: locahost:3000/photos I get this error message:
NameError in PhotosController#index
uninitialized constant Photo
RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace