Suppose you've got an error in your layout file, when you try render an action that uses that layout, instead of getting the error page pointiing out the problem, template_error.rhtml blows up because @request.parameterscontroller? is nil and you can't capitalize nil.
On line #3 of /Users/schubert/Sites/weird/public/../config/..//vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
1: <h1>
2: <%=h @exception.original_exception.class.to_s %> in
3: <%=h @request.parameters["controller"].capitalize %>#<%=h @request.parameters["action"] %>
4: </h1>
5:
6: <p>
(erb):3:in `evaluate_locals'
]]}
The line in question:
{{{
<%=h @request.parameters["controller"].capitalize %>#<%=h @request.parameters["action"] %>
}}}
The fix (well my fix) is just to check if its null, if so, don't try to capitalize it, e.g.:
{{{
<%=h @request.parameters["controller"].capitalize if @request.parameters["controller"] %>#<%=h @request.parameters["action"] %>
}}}