Re: app fails to do job, when I don't change then save applicationController

2011-01-08 Thread Gabriel
Response inline:

On Jan 7, 11:14 am, Michael Baldock michaelb1...@googlemail.com
wrote:

 you're running in
  development mode locally.  This generally means that all of your
  ApplicationController code is reloaded on every request

 I can see how this might cause a different behaviour between local
 app, and heroku app, I have not made any specifications as to which
 mode either the local or the heroku app is running in.

 Is the heroku app automatically set as production mode when I upload
 it?

Yep.

 Would you recommend switching to production mode locally to test the
 app before uploading it?

Yep.

 Having moved all the scraping functions to 'EventSearcher' I've
 discovered it's specifically one function, the one that opens and
 parses the html doc that needs a small change to be made before the
 heroku app works. I'd try and debug this when it doesn't work, but i
 cant get a print out of 'logger.debug' statements on the heroku logs,
 is it possible put in debug statements, and then look at them in the
 heroku logs??

Your debug messages aren't being seen on Heroku because it's running
in production mode and by default that level of logging doesn't happen
in production.  You can change the level of logging that is displayed
in production or you can use logger.warn or some other higher logging
level in order to see it in production.

One odd piece of code that I just noticed:

SuggestedEvent.new do |@savedEvent|

Not sure what your intention is here but it's definitely not a common
idiom.  I would change this to:

@savedEvent = SuggestedEvent.new

and put all of the code in that block into SuggestedEvent#initialize;
passing whatever arguments are needed for a new SuggestedEvent.
Besides being cleaner coding practice it might actually be where your
current problem lies.

Good luck!

Gabriel

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Internal Server Error After a db:push

2011-01-08 Thread Scott LaBounty
When I do a heroku db:push, I get the following ...


Loaded Taps v0.3.14
Warning: Data in the app 'freezing-sunset-75' will be overwritten and will
not be recoverable.
 !   Internal server error


This has worked in the past, but didn't work even after I rolled back the
database to the previous version.

Any ideas?

-- 
Scott
http://steamcode.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.