I do execrise 9.6.5 but got an error

NameError in Users#new

sample_app_rails_4/app/views/shared/_error_messages.html.erb where line #1 raised:

undefined local variable or method `object' for #<#<Class:0x00000102cdd630>:0x00000102ab3be8>

Extracted source (around line #1):

```
1  <% if object.errors.any? %>
2    <div id="error_explanation">
3      <div class="alert alert-error">
4        The form contains <%= pluralize(object.errors.count, "error")%>.
```