Rails 4 - I got NoMethodError undefined method. Please help

I got a NoMethodError when i called <%= @post.admin_user.name %>, don’t know how to fix it.

Extracted source (around line #4):

<h1><%= @post.title %></h1>
<p><%= @post.body %></p>
<small>Post created at <%= @post.created_at.strftime('%b %d. %Y') %></small><br/><br/>
<%= @post.admin_user.name %>
<p>Category: <%= link_to @post.category.name, category_path(@post.category.id) %></p>
<%= link_to 'Edit Post', edit_post_path %> | <%= link_to 'Go Back', posts_path %> |     <%= link_to 'Delete Post', @post, :confirm => "Don't do it man!", :method => :delete %>
</div>

Showing c:/Sites/blog/app/views/posts/show.html.erb where line #5 raised:

undefined method `name’ for nil:NilClass

I got a NoMethodError when i called <%= @post.admin_user.name %>, don't know how to fix it.

Extracted source (around line #4):

    <h1><%= @post.title %></h1>
    <p><%= @post.body %></p>
    <small>Post created at <%= @post.created_at.strftime('%b %d. %Y') %></small><br/><br/>
    <%= @post.admin_user.name %>

If this is line #5 (where the error was reported below), then admin_user is nil.

    <p>Category: <%= link_to @post.category.name, category_path(@post.category.id) %></p>

If this is line #5, then category is nil.

If this were me, I'd poke in the rails console and see what the record settings are, why either of those might be nil, and where they were supposed to be set for the post record.