It is in app/models

On Nov 28, 9:28 am, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> On Nov 28, 1:49 pm, packat <[EMAIL PROTECTED]> wrote:> My first Rails example 
> using model and I got this NameError:
> >  NameError in VandaController#att
> > uninitialized constant VandaController::Compute
>
> Is the model in compute.rb in app/models or lib ?
>

It is in app/models.

I am following a book  "Beginning Ruby on Rails" by Steven Holzner.
That book may be based on older version.  Mine is 1.8.6


After posting the question, I blindly tried running
"ruby script/generate model compute"

and now get a different error:
================
 ActiveRecord::StatementInvalid in VandaController#att
Mysql::Error: Table 'orchids.computes' doesn't exist: SHOW FIELDS FROM
`computes`
================
Apparently, a schema is created for Compute and Ruby thought ther is a
Compute table in the database.
So this is not helping any.




> Fred
Thanks Fred

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to