I've had time to try using a production env on the local machine. Got to 
leave for a contract I'm working today, next...

But the production version didn't work properly. Unable to find the JS 
assets for the front end. Which is odd - they're found in the Heroku 
deployment. There's definitely something squiffy about my local instance, 
that isn't the same as the deployed. Intriguing. Will investigate further. 
And it's not a "git-able" issue. 'git status' says there's no differences. 
and there's nothing to push (tried pushing anyway and Heroku says it is up 
to date).

Debugging this will be a low priority issue - I'm going to focus on adding 
Omniauth to that hobo3model app, and share it, if it works. I can't see a 
cookbook for Hobo 2.1/Rails 4/Omniauth? Perhaps this'll help, when I share 
the repo :)

Cheers, JeremyC.

On Monday, 16 June 2014 12:11:23 UTC+1, Ignacio Huerta wrote:
>
> Hi Jeremy, 
>
> El 16/06/14 10:18, JezC escribió: 
> > I built an app that works (basics, no real customisation) for the core 
> > 3-model... http://hobo3model.heroku.com - just to test. It works fine, 
> > so this issue is something to do with deployment and migration related 
> > issues, I suspect, not the differences between Postgres local and 
> > Heroku's Postgres (which is a serious relief). 
> > 
> > Fortunately, caught this before drilling too deep on the dev system and 
> > making it hard to recover. I suspect that the issue is to do with the 
> > specific order in which associations were developed on the dev machine. 
> > Something, somehow, is being inherited locally. So, revert, clean out 
> > the database entirely, regenerate the models and apply the various 
> > controller constraints and model view controls, and I hope I'll be back 
> > where I should be. Unless heroku remembers something I'd prefer that it 
> > didn't, of course :) 
> > 
> > But... I'd still like a clue on debugging differences between dev and 
> > production in hobo. In straight Rails, I'd be dumping Rails.logger 
> > statements all over the shop, and hoping to detect where the problem 
> > emerged. In Hobo? With all the automated generation? Dunno. That seems 
> > old and clunky. Clues? Please? 
>
> Using Rails.logger everywhere is always a good idea. If you want to 
> debug some of the Hobo automatic stuff, you can add "Rails.logger" 
> inside the gem's source. Just find the folder where the hobo gem is 
> installed, edit the files and restart the app. It can be a bit confusing 
> the first time you dig so deep, so please ask if you have any doubt. 
>
> To fix this particular problem: If you run the application in your local 
> system, but in production mode (rails s -e production), does it work? 
> - If it works then it's clearly an issue with Heroku/deployment. 
> - If it doesn't work then we have the door open to try to find the 
> origin of the problem. As Vivek suggested, maybe you share some source 
> code? 
>
> Warm regards, 
> Ignacio 
>
>
> > 
> > Cheers, JeremyC 
> > 
> > On Sunday, 15 June 2014 22:40:40 UTC+1, JezC wrote: 
> > 
> >     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] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > To post to this group, send email to [email protected] 
> <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > Visit this group at http://groups.google.com/group/hobousers. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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