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

-- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre

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