15th Thu
ExceptionNotifierプラグインのバグ情報
こちら
で、ExceptionNotifierプラグインのテンプレートに関するバグの報告が出ていました。
Plugins - Exception Notifier
Brett Neumeier 12 Oct 2007
In ruby 1.8.6p111, rendering the _environment.rhtml plugin fails with "TemplateError: flag after width". This is fixed if you change the string "%-s" to "%-s" on line three of the template.
Chris 18 Oct 2007
This is the correct string: "%-*s:"
具体的には、views/exception_notifier/_environment.rhtml の3行目を次のように修正すればOKのようです。
views/exception_notifier/_environment.rhtml
<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%>
<% @request.env.keys.sort.each do |key| -%>
* <%= "%-*s: %s" % [max.length, key, filter_sensitive_post_data_from_env(key, @request.env[key].to_s.strip)] %>
<% end -%>
手元の環境(ruby-1.8.6 p36/Rails-1.99.0)では、これで問題なく動作するようになりました。
posted by
genki on Thu 15 Nov 2007 at 05:11 with 0 comments