uninitialized constant TodosHelper::Staleness

9 views
Skip to first unread message

Carsten Otto

unread,
Nov 10, 2018, 3:59:40 PM11/10/18
to TracksApp
Hey,

I just upgraded to the latest master (thanks for all the work!). Now I get the error mentioned in the subject (context below). Do you have an idea what this is?

Thanks,
Carsten

I, [2018-11-10T21:57:31.256355 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Rendering todos/index.html.erb within layouts/application
D, [2018-11-10T21:57:31.257867 #3298] DEBUG -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Context Load (0.6ms)  SELECT "contexts".* FROM "contexts" WHERE "contexts"."user_id" = $1 AND "contexts"."state" = $2 ORDER BY position ASC  [["user_id", 1], ["state", "active"]]
I, [2018-11-10T21:57:31.259868 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] Read fragment views/contexts/21-20181110175411941296/todo/20181110//e965f7777543518cc6376748df483765 (0.2ms)
I, [2018-11-10T21:57:31.260517 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] Read fragment views/contexts/1-20181110175406096166/todo/20181110//e965f7777543518cc6376748df483765 (0.1ms)
I, [2018-11-10T21:57:31.262500 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] Read fragment views/todos/12083-20180930160138518056/20181110/todo/true/87f7861afa8c2849bbcddf7ac85b5c2d (0.1ms)
I, [2018-11-10T21:57:31.271730 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Rendered collection of todos/_todo.html.erb [10 times] (9.7ms)
I, [2018-11-10T21:57:31.271848 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Rendered todos/_collection.html.erb (10.6ms)
I, [2018-11-10T21:57:31.271932 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Rendered collection of contexts/_context.html.erb [12 times] (13.2ms)
I, [2018-11-10T21:57:31.272037 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   Rendered todos/index.html.erb within layouts/application (15.6ms)
I, [2018-11-10T21:57:31.272222 #3298]  INFO -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] Completed 500 Internal Server Error in 197ms (ActiveRecord: 23.8ms)
F, [2018-11-10T21:57:31.273772 #3298] FATAL -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   
F, [2018-11-10T21:57:31.273851 #3298] FATAL -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] ActionView::Template::Error (uninitialized constant TodosHelper::Staleness):
F, [2018-11-10T21:57:31.274015 #3298] FATAL -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     32:         </li>
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     33:       </ul>
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     34:       <%= grip_span(todo) %>
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     35:       <div class="description<%= staleness_class( todo ) %>">
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     36:         <%= date_span(todo) -%>
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     37:         <span class="todo.descr"><%= h todo.description %></span>
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]     38:         <%= image_tag_for_recurring_todo(todo) if todo.from_recurring_todo? %>
F, [2018-11-10T21:57:31.274064 #3298] FATAL -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e]   
F, [2018-11-10T21:57:31.274146 #3298] FATAL -- : [4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:345:in `staleness_class'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/todos/_todo.html.erb:35:in `block in _app_views_todos__todo_html_erb___832255340534719034_70253090914200'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/todos/_todo.html.erb:13:in `_app_views_todos__todo_html_erb___832255340534719034_70253090914200'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:131:in `block in todos_container_items'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:129:in `todos_container_items'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/todos/_collection.html.erb:6:in `block in _app_views_todos__collection_html_erb__1908259698100739546_70253090842220'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:108:in `block in todos_container'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:104:in `todos_container'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/todos/_collection.html.erb:4:in `_app_views_todos__collection_html_erb__1908259698100739546_70253090842220'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/contexts/_context.html.erb:8:in `block in _app_views_contexts__context_html_erb___625939975678619084_70253090729720'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/contexts/_context.html.erb:5:in `_app_views_contexts__context_html_erb___625939975678619084_70253090729720'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/helpers/todos_helper.rb:26:in `show_grouped_todos'
[4ac7fed3-a8f7-4e18-9d7c-c6fee8d5b53e] app/views/todos/index.html.erb:4:in `_app_views_todos_index_html_erb__2068100935762906432_70253090510760'

Matt Rogers

unread,
Nov 11, 2018, 12:39:44 PM11/11/18
to trac...@googlegroups.com
Thanks so much for testing! I'll take a look at this and see what I can do for a fix.I've filed an issue - https://github.com/TracksApp/tracks/issues/2137 - so that I can be sure to get that fixed soon.

Thanks!
--
Matt

--
You received this message because you are subscribed to the Google Groups "TracksApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tracksapp+...@googlegroups.com.
To post to this group, send email to trac...@googlegroups.com.
Visit this group at https://groups.google.com/group/tracksapp.
For more options, visit https://groups.google.com/d/optout.

Matt Rogers

unread,
Nov 11, 2018, 1:47:34 PM11/11/18
to TracksApp
I tried to reproduce this just now and couldn't. :( 

I don't have any stale todos yet though. Are those required to reproduce this?

Carsten Otto

unread,
Nov 12, 2018, 12:26:49 PM11/12/18
to trac...@googlegroups.com
Thank you! We're getting somewhere, next error:

I, [2018-11-12T18:25:08.715834 #17778] INFO -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] Rendered collection of
todos/_todo.html.erb [15 times] (95.4ms)
I, [2018-11-12T18:25:08.716138 #17778] INFO -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] Rendered
todos/_collection.html.erb (97.0ms)
I, [2018-11-12T18:25:08.716232 #17778] INFO -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] Rendered collection of
contexts/_context.html.erb [12 times] (178.1ms)
I, [2018-11-12T18:25:08.716338 #17778] INFO -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] Rendered todos/index.html.erb
within layouts/application (200.5ms)
I, [2018-11-12T18:25:08.717180 #17778] INFO -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] Completed 500 Internal Server
Error in 1271ms (ActiveRecord: 103.9ms)
F, [2018-11-12T18:25:08.720415 #17778] FATAL -- :
[6705ff5a-0465-468d-a723-1fed694a4a01]
F, [2018-11-12T18:25:08.720486 #17778] FATAL -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] ActionView::Template::Error
(uninitialized constant Tracks::AttributeHandler):
F, [2018-11-12T18:25:08.721192 #17778] FATAL -- :
[6705ff5a-0465-468d-a723-1fed694a4a01] 34: <%=
grip_span(todo) %>
[6705ff5a-0465-468d-a723-1fed694a4a01] 35: <div
class="description<%= staleness_class( todo ) %>">
[6705ff5a-0465-468d-a723-1fed694a4a01] 36: <%= date_span(todo) -%>
[6705ff5a-0465-468d-a723-1fed694a4a01] 37: <span
class="todo.descr"><%= h todo.description %></span>
[6705ff5a-0465-468d-a723-1fed694a4a01] 38: <%=
image_tag_for_recurring_todo(todo) if todo.from_recurring_todo? %>
[6705ff5a-0465-468d-a723-1fed694a4a01] 39: <%= tag_list(todo) %>
[6705ff5a-0465-468d-a723-1fed694a4a01] 40: <%=
deferred_due_date(todo) %>
F, [2018-11-12T18:25:08.721280 #17778] FATAL -- :
[6705ff5a-0465-468d-a723-1fed694a4a01]
F, [2018-11-12T18:25:08.721338 #17778] FATAL -- :
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/models/recurring_todos/abstract_recurrence_pattern.rb:73:in
`build_from_recurring_todo'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/models/recurring_todo.rb:76:in `pattern'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/models/recurring_todo.rb:86:in `recurring_target_as_text'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/application_helper.rb:106:in `recurrence_pattern_as_text'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:242:in `image_tag_for_recurring_todo'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/todos/_todo.html.erb:37:in `block in
_app_views_todos__todo_html_erb___841895864072784174_70308153675240'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/todos/_todo.html.erb:13:in
`_app_views_todos__todo_html_erb___841895864072784174_70308153675240'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:133:in `block in todos_container_items'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:131:in `todos_container_items'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/todos/_collection.html.erb:6:in `block in
_app_views_todos__collection_html_erb__465889732732105804_70308153627820'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:110:in `block in todos_container'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:106:in `todos_container'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/todos/_collection.html.erb:4:in
`_app_views_todos__collection_html_erb__465889732732105804_70308153627820'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/contexts/_context.html.erb:8:in `block in
_app_views_contexts__context_html_erb___3946485166821518221_70308153519040'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/contexts/_context.html.erb:5:in
`_app_views_contexts__context_html_erb___3946485166821518221_70308153519040'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/helpers/todos_helper.rb:28:in `show_grouped_todos'
[6705ff5a-0465-468d-a723-1fed694a4a01]
app/views/todos/index.html.erb:4:in
`_app_views_todos_index_html_erb___1216311748849686157_70308153291940'

Matt Rogers

unread,
Nov 12, 2018, 2:28:00 PM11/12/18
to trac...@googlegroups.com
I haven't touched any of the recurring todo stuff yet, so I can't say I'm surprised that it's broken. Would you mind opening an issue on GitHub for this with how things are configured so I can reproduce it? Please feel free to assign it to me if you do open it.

Thanks!
--
Matt

Matt Rogers

unread,
Nov 17, 2018, 10:58:01 AM11/17/18
to trac...@googlegroups.com
I filed an issue for this so it wouldn't fall through the cracks. I'll take a closer look after the rails 5.2 upgrade is done.

Carsten Otto

unread,
Nov 17, 2018, 3:30:36 PM11/17/18
to trac...@googlegroups.com
Thank you! I procrastinated creating that issue...
Reply all
Reply to author
Forward
0 new messages