我正在尝试使用 Rails 5.0 书籍中介绍的敏捷开发方法。按照书中所说,我已经将图像手动加载到 app/assets/images
目录中。
以下是显示错误的行:
<%= image_tag(product.image_url, class: 'list_image') %>
如我所述,我加载了称为image.jpg
的图像,但它出现了错误。
捕获ActionController异常
在Products#index中捕获Sprockets::Rails::Helper::AssetNotFound异常
"image.jpg"资产不存在于资产管道中。
当我在预填数据库中检查时,有一个带有URL image.jpg
的图像,但它仍然出现错误。
app/assets/images
目录下,这只是一些手工添加的测试数据,所以我还没有实现 paperclip。 - user3576036image_url
column has the name of the image file which are inapp/assets/images
- user3576036