Rails model with no table?

William Attwood wattwood at gmail.com
Fri Jul 18 14:09:15 MDT 2008


Do you have access to the prod DB, and if so, could it be a view instead of
a table?

--Will

On Fri, Jul 18, 2008 at 2:01 PM, Stephen Ward <sjward at gmail.com> wrote:

> 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.
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>



More information about the PLUG mailing list