Hi Ignacio, and all:

I learned something new about git :-[ .

After beating my head against the wall, I stopped to consider the facts:

1) My code is known to work locally and has been thoroughly tested.
2) Heroku is a professional organization and their stuff just works (more often than mine). 3) My code is crashing on heroku, but only in regions changed in the latest major update.

These things considered, something is changing between here and heroku. The most likely problem is the git repository I am uploading. (Sender: OK, Receiver: OK, Data being sent: ???)

I restored most of my original code and dropped back to the simplest git commands:

git add .
git commit -m "another hacking commit"  and...

Wow, a huge list of changed files appears!!!!! (most of which were from the new update).

git push heroku

App now works (except for residual hacks I put in while trying to debug the earlier crashes).

What is different? I had been using 'git commit -a -m "message"'. As you can see from the above "simplest git commands" I changed to 'git add .; git commit -m "message"'.

Apparently, 'git -a -m "message"' != 'git add .; git commit -m "message"' although I remember seeing the first version as a substitute for the second in many places in git docs. Someday I will try to figure this out, but for now, I'm back to re-hosting my app on heroku so the client can test it.

Thanks for putting up with me.

Don Ziesig



On 11/25/2013 01:53 PM, Donald Ziesig wrote:
I tried another new resource RequestTime.  No luck.... Same results

Don

On 11/25/2013 01:43 PM, Donald Ziesig wrote:
Thanks Ignacio,

I will keep trying and let you know if I have any luck.

Don

On 11/25/2013 01:37 PM, Ignacio Huerta wrote:
Received Don. Tomorrow morning I'll take a good look at this first
thing, I'll inform you if I can reproduce/solve it ;).

Regards,
Ignacio

El 25/11/13 19:31, Donald Ziesig escribió:
Hi Ignacio,

I created a totally new resource called TimingRequest (I left the
ShowingTiming there, but disconnected it from the rest of the code).
Now heroku crashes with:

uninitialized constant Showing::TimingRequest

I forgot to mention that 'heroku run rake db:migrate' also crashes with
the same error but locally 'rake db:migrate' works properly.

Here are snippets of the offending code:

timing_request.rb:

class TimingRequest < ActiveRecord::Base

   hobo_model # Don't put anything above this

   fields do
     name  :string
     index :integer
     timestamps
   end
   attr_accessible :name, :index

   has_many :showings

   # --- Permissions --- #

### snip ###

showing.rb:

class Showing < ActiveRecord::Base

   hobo_model # Don't put anything above this

   fields do
     name              :string
     desired_responses :integer, :default => 0
     accepted          :boolean, :default => false
     timestamps
   end
attr_accessible :name, :showing_request, :timing_request, :listing_id, :client_id, :showing_request_id, :timing_request_id,
:desired_responses
   attr_reader :desired_response

#  belongs_to :showing_timing
   belongs_to :listing, :inverse_of => :showings
   belongs_to :client, :inverse_of => :showings

   belongs_to :showing_request
   belongs_to :timing_request

### snip ###

The model showing_request is identical to timing_request (and with very
similar function), except for the name, and it works properly.

I'm grasping at straws, but I will next try to change 'timing_request'
to something that comes before showing alphabetically for example
'request_timing' to see if that may have something to do with it. (It
doesn't make sense that showing_request works though).

I could change showing_timing to a model without a db table, but
eventually I will have to address the lead_notice problem which will not
yield to that solution (I need the db functionality there). I also
figure that if I solve the easier problem, it will make the harder one
solvable as well.

Don

On 11/25/2013 12:55 PM, Ignacio Huerta wrote:
Hi Don,

That's quite weird :S, it looks like some kind of "naming" issue. If
changing the names of the models does not help, please tell us and I'll
try to upload a simple app to Heroku to reproduce the issue.

Regards,
Ignacio

El 25/11/13 17:59, Donald Ziesig escribió:
Hi All!

I am having a problem (yes, another one:-[ ). I have an app that works
fine on my local machine running under foreman (production mode).  I
uploaded the app to heroku and copied the database using pgbackup
locally and pgrestore on heroku. The database contents are identical as
far as I can tell.

On heroku, it crashes almost immediately after starting with the error:

uninitialized constant Showing::ShowingTiming

pointing to the first line of:


    belongs_to :showing_timing
    belongs_to :listing, :inverse_of => :showings
    belongs_to :client, :inverse_of => :showings

in showing.rb

when I comment this out and reload:

uninitialized constant Agent::LeadNotice

pointing to:

    has_many :lead_notices, :accessible => true
    children :lead_notices

in agent.rb

When I comment this out and reload, the app no longer crashes, but
neither "Showing timing" nor "Lead notices" appear in the menu (they are there on the local machine when uncommented), and referencing them on
heroku then causes the app to crash (local crashes same way when run
with them commented out).

I am going to try duplicating showing_timing with another name and
changing the reference to it in showing.rb to see if it affects anything (leaving the lead_notices commented out for now). I'll post the results
of that here when I get them.

In the meantime, if anyone has any ideas of how to troubleshoot this
further, I would greatly appreciate hearing from you.

Thanks,

Don Ziesig









--
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/groups/opt_out.

Reply via email to