Rails model with no table?

Stephen Ward sjward at gmail.com
Fri Jul 18 14:01:48 MDT 2008


Just yesterday I inherited a Rails project that is overdue.  Yay!
Also, I'm rather a bit of a Ruby/Rails novice.  Double yay!

The problem I'm currently trying to solve is this: there is a model
class in this rails app that does not have a corresponding database
table.  In fact, there is a comment in the model class code that says:
"I admit this is a bit of a hack, since there is not [sic] 'XYZ' table
in the db".  When I try to run the app, webrick spits out the
following: "Mysql::Error: Table 'XYZ' doesn't exist: SHOW FIELDS FROM
`XYZ`".

I do know that the original author got this working somehow because
it's running just fine out in the wild.  Unfortunately, I don't have
access to that instance.  Just the source code as it was checked in to
subversion.

What can I do?

Thanks,
Stephen

P.S. I also posted this on the URUG, but I only just joined so I don't
know how responsive they'll be.  For any of you in that group, I
sincerely apologize for the cross post.  I am just really anxious to
get this resolved.



More information about the PLUG mailing list