NoMethodError in Posts#show

Showing /root/traveling-staging/app/views/posts/show.html.erb where line #12 raised:

undefined method `title' for nil:NilClass
Extracted source (around line #12):
10
11
12
13
14
15
              
<div class="row">
<div class="col-lg-6">
<h3 class="card-title font-size-28"><%= @post.title %></h3>
<p class="card-meta pb-3">
<span class="post__author"><%= I18n.t('posts.details.by') %> <a href="#" class="text-gray"><%= @post.user.full_name %></a></span>
<span class="post-dot"></span>

Rails.root: /root/traveling-staging

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"id"=>"index", "format"=>"html"}

Response

Headers:

None