Hi, got an odd problem that I don't know how to debug in Hobo. I've a 
simple three model application. I might even be able to set it up again, 
with generic model names, it's that simple. :)

Users have Things, Things have Stuff that is owned by Users.

Pretty similar to the Agility Tutorial, except even simpler. :)

I can run around this app in development mode on my desktop system with no 
problem. I'm using Postgres on both development and production systems - 
I've been stung by this "database agnostic" thing before... So as close to 
the same DB as possible on dev and production systems.

I have (I say this, because I expect that this is the cause of the 
problem), a "children :stuffs" in the Thing model. That, I think, causes 
the need to refer to the 'thing_id" in the "Stuff" instance. And that works 
on my dev machine. I get lists of Stuff that are attached to Things. And 
the Things and the Stuff are owned by Users, as they should be. So... 
fairly sure that I have the associations working. Nothing screams and 
fails, at least.

But, when I run on Heroku, in production mode, I get a message about 
'thing_id":

GET "/things/1-a-thing"
...

app/views/taglibs/auto/rapid/pages.dryml:74:in `show_page__for_thing'

ActionView::Template::Error (unknown attribute: thing_id):

Pretty sure this is the attempt to use Stuff to find the matching 
thing_id's. And there is a table for Stuff with a thing_id field in both 
Dev and Production databases. Otherwise the dev machine wouldn't work, eh? 
Using 'heroku pg:psql" and the "\\d" command to show the tables and the 
fields in each table, shows the tables look as I'd expect, with the Stuff 
table having a thing_id field.

So... obviously I haven't run the db migration on heroku? I did the whole 
"heroku pg:reset" thing to make sure that I had  new clean DB built from 
the migrations. Did the equivalent ('rake db:reset') on the dev machine and 
re-checked. Same thing. Dev machine runs through all tests. The moment that 
I add a new Thing and try to look at it, with no Stuff yet added, I get the 
error on the production server. Every time. And when I try the exact same 
operation on the dev machine, it works. Puzzling, eh?

So... what's the right way to debug Hobo to find out what is happening?

And if anyone has a vague idea of why the dev and production modes result 
in differences, I'd love to hear. Do note that I'm using Postgres on my dev 
machine and the thing-that-is-pretty-much-postgres on Heroku. I have 
suspicions about that difference. But I need some way to debug via DRYML on 
the production server, I guess. What's the best way to do that?

TIA, JeremyC.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to