Internal error
なんだこれは!
リプレイス完全だと思ったらチケット一覧とガントチャートを見ると…エラー吐いてた。
とりあえずログを見てみた。
■tail -f redmine/log/*
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
Started GET "/projects/sre/issues" for xxx.xxx.xxx.xxx at 2017-09-16 21:47:07 +0900 Processing by IssuesController#index as HTML Parameters: {"project_id"=>"sre"} Current user: adachi (id=216) Rendered queries/_filters.html.erb (13.8ms) Rendered queries/_query_form.html.erb (14.2ms) Rendered issues/index.html.erb within layouts/base (16.4ms) Completed 500 Internal Server Error in 108ms (ActiveRecord: 28.1ms) ActionView::Template::Error (undefined method `remote' for #<Hash:0x00xxxxxxxxxxxx>): 1: <%= javascript_tag do %> 2: var operatorLabels = <%= raw_json Query.operators_labels %>; 3: var operatorByType = <%= raw_json Query.operators_by_filter_type %>; 4: var availableFilters = <%= raw_json query.available_filters_as_json %>; 5: var labelDayPlural = <%= raw_json l(:label_day_plural) %>; 6: 7: var filtersUrl = <%= raw_json queries_filter_path(:project_id => @query.project.try(:id), :type => @query.type) %>; app/models/query.rb:464:in `block in available_filters_as_json' app/models/query.rb:462:in `each' app/models/query.rb:462:in `available_filters_as_json' app/views/queries/_filters.html.erb:4:in `block in _app_views_queries__filters_html_erb__1707453849620530117_47149003571260' app/views/queries/_filters.html.erb:1:in `_app_views_queries__filters_html_erb__1707453849620530117_47149003571260' app/views/queries/_query_form.html.erb:10:in `_app_views_queries__query_form_html_erb___311945942017538343_47149003694160' app/views/issues/index.html.erb:11:in `block in _app_views_issues_index_html_erb__2268216513892205100_47149003908060' app/views/issues/index.html.erb:10:in `_app_views_issues_index_html_erb__2268216513892205100_47149003908060' app/controllers/issues_controller.rb:51:in `block (2 levels) in index' app/controllers/issues_controller.rb:46:in `index' lib/redmine/sudo_mode.rb:63:in `sudo_mode' |
どうやらapp/models/query.rbがおかしいとか。
■ActionView::Template::Error (undefined method `remote’ for #<Hash:0x007f9aede03320>)
http://www.redmine.org/issues/26637
まったく同じ現象になっている人を発見!
ありがたい!
というかredmine公式よりアナウンスしてるからバグかな。
■fix redmine/app/models/query.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ cd /usr/share/h2o/redmine/app/models $ cp query.rb query.rbbk $ vim query.rb json = {} available_filters.each do |field, filter| options = {:type => filter[:type], :name => filter[:name]} - options[:remote] = true if filter.remote + options[:remote] = true if filter.respond_to?('remote') && filter.remote - if has_filter?(field) || !filter.remote + if has_filter?(field) || !filter.respond_to?('remote') || !filter.remote options[:values] = filter.values if options[:values] && values_for(field) missing = Array(values_for(field)).select(&:present?) - options[:values].map(&:last) |
・unicorn h2o restart
1 2 3 4 5 6 7 8 |
# /etc/init.d/unicorn restart stop Unicorn start Unicorn # /etc/init.d/h2o restart Stopping h2o: [ OK ] Starting h2o: start_server (pid:20935) starting now... [ OK ] |
Internal error出なくなった!
0件のコメント