我正在使用paperclip和Imagemagick将图像添加到网站。我在网站上有一个表单供用户上传图片。当我上传图片时,它不会出现任何错误。当我检查rails控制台时,图像将以正确的大小保存。当我检查项目文件夹时,图像也会保存在那里。但是当我尝试显示时,我在网站上得到以下屏幕(只添加了一个图像,只有左边的图像应该显示,剩下的标签是因为没有添加图像): Screenshot of screen
这是我的index.html页面:
<h1 class="current-category"><%= params[:category]%></h1>
<% if @books.count == 0 %>
<h1>There are no books currently in this category</h1>
<%else%>
<% @books.each do |book| %>
<a href="/books/<%= book.id %>">
<%= image_tag book.book_img.url(:book_index) %>
</a>
<% end %>
<%end%>
我在终端窗口收到以下错误消息:Screenshot of terminal window
请让我知道为什么会这样。谢谢。