You have a nil object when you didn't expect it!

<% if @flash[:error] %>
    <div id="error"><%= @flash[:error] %></div>
<% end %>
<% if @flash[:warning] %>
    <div id="warning"><%= @flash[:warning] %></div>
<% end %>
<% if @flash[:notice] %>
    <div id="notice"><%= @flash[:notice] %></div>
<% end %>


Did you see any line number in the error?
It would be helpful if you gould give the whole trace rather than just the error message


How I must do it?

could it be, it's "flash[:notice]" without the @.

if not, tell us where your error occurred (which line). then show us
the code calling it (controller/action).

MaD wrote:

could it be, it's "flash[:notice]" without the @.

Thanks, now it works.