こちら で、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

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry195
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ