Details
Description
Hi all,
I've just upgraded Sonar from 2.0.1 to 2.1.1. Everything seemed to work fine, but when I click on "Time Machine" in some of my projects, I get "We're sorry, but something went wrong."
Time machine still works for some of my projects, but not for all.
The log says:
2010.05.15 11:59:32 ERROR rails ActionView::TemplateError (undefined method `to_date' for nil:NilClass) on line #105 of app/views/timemachine/index.html.erb: 102: </th> 103: <% @snapshots.each do |snapshot| %> 104: <th nowrap="nowrap" align="right" valign="top"> 105: <%= l snapshot.created_at.to_date %> 106: <br/> 107: <% snapshot.user_events.each do |event| %> 108: <b><%= event.fullname %></b> app/views/timemachine/index.html.erb:105 app/views/timemachine/index.html.erb:103:in `each' app/views/timemachine/index.html.erb:103 gems/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `render' gems/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in `render_template' gems/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in `render' gems/gems/actionpack-2.2.2/lib/action_view/base.rb:367:in `_render_with_layout' gems/gems/actionpack-2.2.2/lib/action_view/base.rb:254:in `render' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in `render_for_file' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:896:in `render' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark' gems/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:in `render' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark' gems/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1248:in `default_render' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1254:in `perform_action' gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters' gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-complete-1.4.0.jar!/META-INF/jruby.home/lib/ruby/1.8/benchmark.rb:293:in `measure' gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark' gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue' gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching' gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache' gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process' gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters' gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support' gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process' gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request' gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked' gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch' gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi' gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-rack-0.9.6.jar!/rack/adapter/rails_cgi.rb:25:in `call' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-rack-0.9.6.jar!/rack/adapter/rails.rb:36:in `serve_rails' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-rack-0.9.6.jar!/rack/adapter/rails.rb:41:in `call' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-rack-0.9.6.jar!/jruby/rack/rails.rb:149:in `call' file:/opt/vam/sonar-2.1.1/war/sonar-server/WEB-INF/lib/jruby-rack-0.9.6.jar!/rack/handler/servlet.rb:19:in `call' :1
Additionally, for the projects where time machine still works, the stable version between the snapshots is missing from the chart. Please see the attached screenshot for more information: on 05/07, we released a 3.3.0 stable, which was visible in the chart before the Sonar upgrade, and now is missing from it.
Regards
Robert
Issue Links
- is duplicated by
-
SONAR-1565
ActionView::TemplateError (undefined method `to_date')
-
Hi Freddy,
I'm switching my installation back to 2.0.1 but I'll keep a backup of the database in its current state, so if you have additional questions, I can start the 2.1.1 instance again to give you more information.
Regards
Robert