Hartle 第 11 章缺失部分 microposts/_micropost

Hartle chaper 11 Missing partial microposts/_micropost

我是 rails 的新手,但我在 hartls 教程的第 11 章中一直遇到问题,目前 <%= render 'shared/feed' %> 给出

Missing partial microposts/_micropost with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}.

您错过了这个:

代码清单 11.21:显示单个微博的部分代码。

app/views/microposts/_micropost.html.erb

<li id="micropost-<%= micropost.id %>">
  <%= link_to gravatar_for(micropost.user, size: 50), micropost.user %>
  <span class="user"><%= link_to micropost.user.name, micropost.user %></span>
  <span class="content"><%= micropost.content %></span>
  <span class="timestamp">
    Posted <%= time_ago_in_words(micropost.created_at) %> ago.
  </span>
</li>

创建这个部分,一切都会好起来的