IceskYsl / holidays

This is a holidays plugin for Redmine
MIT License
5 stars 8 forks source link

500 Internal Server Error while clicking the "holidays" tab #10

Open jlegido opened 10 years ago

jlegido commented 10 years ago

Hi there.

I successfully completed the install instructions:

http://www.redmine.org/plugins/holidays

Then I clicked on the "holidays" tab and I got below exception:

Started GET "/holidays" for 10.0.0.16 at Mon Jun 23 15:22:45 +0200 2014 Processing by HolidaysController#index as HTML Current user: javier.legido (id=9) Rendered plugins/holidays/app/views/holidays/_nav.html.erb (1.2ms) Rendered plugins/holidays/app/views/holidays/index.html.erb within layouts/base (5.3ms) Completed 500 Internal Server Error in 19.8ms

ActionView::Template::Error (undefined method sunday?' for Mon, 26 May 2014:Date): 13: <% day = @calendar.startdt 14: while day <= @calendar.enddt %> 15: <%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == @calendar.first_wday %> 16: <td class="<%= day.month==@calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %> <%= (day.sunday? || day.saturday?) ? 'weekend' : 'weekday' %>"> 17: <p class="day-num"><%= day.day %></p> 18: <% @calendar.events_on(day).each do |i| %> 19: <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip"> plugins/holidays/app/views/holidays/index.html.erb:16:in_plugins_holidays_app_views_holidays_index_html_erb_1858800593_70021819238460' actionpack (3.2.15) lib/action_view/template.rb:145:in send' actionpack (3.2.15) lib/action_view/template.rb:145:inrender' activesupport (3.2.15) lib/active_support/notifications.rb:125:in instrument' actionpack (3.2.15) lib/action_view/template.rb:143:inrender' actionpack (3.2.15) lib/action_view/renderer/template_renderer.rb:47:in render_template' actionpack (3.2.15) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' activesupport (3.2.15) lib/active_support/notifications.rb:123:in instrument' activesupport (3.2.15) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.15) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.15) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' actionpack (3.2.15) lib/action_view/renderer/template_renderer.rb:46:in render_template' actionpack (3.2.15) lib/action_view/renderer/template_renderer.rb:54:inrender_with_layout' actionpack (3.2.15) lib/action_view/renderer/template_renderer.rb:45:in render_template' actionpack (3.2.15) lib/action_view/renderer/template_renderer.rb:18:inrender' actionpack (3.2.15) lib/action_view/renderer/renderer.rb:36:in render_template' actionpack (3.2.15) lib/action_view/renderer/renderer.rb:17:inrender' actionpack (3.2.15) lib/abstract_controller/rendering.rb:110:in _render_template' actionpack (3.2.15) lib/action_controller/metal/streaming.rb:225:in_render_template' actionpack (3.2.15) lib/abstract_controller/rendering.rb:103:in render_to_body' actionpack (3.2.15) lib/action_controller/metal/renderers.rb:28:inrender_to_body' actionpack (3.2.15) lib/action_controller/metal/compatibility.rb:50:in render_to_body' actionpack (3.2.15) lib/abstract_controller/rendering.rb:88:inrender' actionpack (3.2.15) lib/action_controller/metal/rendering.rb:16:in render' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:40:inrender' activesupport (3.2.15) lib/active_support/core_ext/benchmark.rb:5:in ms' /usr/lib/ruby/1.8/benchmark.rb:308:inrealtime' activesupport (3.2.15) lib/active_support/core_ext/benchmark.rb:5:in ms' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:40:inrender' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:83:in cleanup_view_runtime' activerecord (3.2.15) lib/active_record/railties/controller_runtime.rb:24:incleanup_view_runtime' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:39:in render' actionpack (3.2.15) lib/action_controller/metal/implicit_render.rb:10:indefault_render' actionpack (3.2.15) lib/action_controller/metal/implicit_render.rb:5:in send_action' actionpack (3.2.15) lib/abstract_controller/base.rb:167:inprocess_action' actionpack (3.2.15) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (3.2.15) lib/abstract_controller/callbacks.rb:18:inprocess_action' activesupport (3.2.15) lib/active_support/callbacks.rb:469:in `_run1597795220__process_action42862657callbacks' activesupport (3.2.15) lib/active_support/callbacks.rb:405:insend' activesupport (3.2.15) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.15) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' activesupport (3.2.15) lib/active_support/callbacks.rb:81:insend' activesupport (3.2.15) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.15) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.15) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' activesupport (3.2.15) lib/active_support/notifications.rb:123:ininstrument' activesupport (3.2.15) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.15) lib/active_support/notifications.rb:123:ininstrument' actionpack (3.2.15) lib/action_controller/metal/instrumentation.rb:29:inprocess_action' actionpack (3.2.15) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' activerecord (3.2.15) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.15) lib/abstract_controller/base.rb:121:inprocess' actionpack (3.2.15) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.15) lib/action_controller/metal.rb:203:indispatch' actionpack (3.2.15) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.15) lib/action_controller/metal.rb:246:inaction' actionpack (3.2.15) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (3.2.15) lib/action_dispatch/routing/route_set.rb:73:indispatch' actionpack (3.2.15) lib/action_dispatch/routing/route_set.rb:36:incall' journey (1.0.4) lib/journey/router.rb:68:incall' journey (1.0.4) lib/journey/router.rb:56:ineach' journey (1.0.4) lib/journey/router.rb:56:incall' actionpack (3.2.15) lib/action_dispatch/routing/route_set.rb:608:incall' rack-openid (1.4.1) lib/rack/openid.rb:99:incall' actionpack (3.2.15) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.5) lib/rack/etag.rb:23:incall' rack (1.4.5) lib/rack/conditionalget.rb:25:incall' actionpack (3.2.15) lib/action_dispatch/middleware/head.rb:14:incall' actionpack (3.2.15) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.15) lib/action_dispatch/middleware/flash.rb:242:incall' rack (1.4.5) lib/rack/session/abstract/id.rb:210:incontext' rack (1.4.5) lib/rack/session/abstract/id.rb:205:incall' actionpack (3.2.15) lib/action_dispatch/middleware/cookies.rb:341:incall' activerecord (3.2.15) lib/active_record/query_cache.rb:64:incall' activerecord (3.2.15) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall'