资产"logo.png"在资产管道中不存在

编程入门 行业动态 更新时间:2024-10-28 03:29:10
本文介绍了资产"logo.png"在资产管道中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Rails 5.1.3中 我在应用程序/资产/图像中更改徽标文件 然后错误不知道要解决什么.有人知道吗?

In Rails 5.1.3 I change logo file in app/assets/images Then error don't know what to fix. Any one know ?

The asset "logo.png" is not present in the asset pipeline.

已经尝试重新启动rails,rails clean,rails或rails asset:precompile

Already try restart rails, rails clean, rails or rails assets:precompile

这是我的config/initializers/assets.rb

Here my config/initializers/assets.rb

# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules folder to the asset load path. Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css )

推荐答案

我遇到了类似的问题.解决方案是在图像上添加文件扩展名.

I had a similar problem. The solution was to add the file extension on the image.

= image_tag 'logo', alt: ''

= image_tag 'logo.jpg', alt: ''

更多推荐

资产"logo.png"在资产管道中不存在

本文发布于:2023-07-08 01:05:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1070170.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:资产   中不   管道   logo   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!