こちら で、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 Png genki on Thu 15 Nov 2007 at 05:07

Search Words:

  • exceptionnotifier13 rails4 exception_notifier2 notifier2 exception2 uninitialized2 constant2 インストール1 rspec1 exception notifier1 after1 %1 to1 how1 install1 flag1 _environment1 ruby1 templateerror1 test1 width1

Comments:

or Preview
Tags
rails bug plugin report fix
Social Bookmarks
  • Delicious
  • B_entry195
  • Clip_16_12_w195