Glyphicons在生产轨道中没有正确预编译

 佳君旭博21 发布于 2023-02-03 10:05

使用Rails 4,我遇到了一个问题,即Bootstrap中的glyphicons没有被正确预编译.生成以下内容:

started GET "/assets/glyphicons-halflings-white-ed38e147e3f6e976c0a7ad59e4d628f3.png" for          127.0.0.1 at 2014-01-13 18:41:25 -0500
Started GET "/assets/glyphicons-halflings-white-ed38e147e3f6e976c0a7ad59e4d628f3.png" for 127.0.0.1 at 2014-01-13 18:41:25 -0500
Processing by ApplicationController#routing_error as PNG
Processing by ApplicationController#routing_error as PNG
  Parameters: {"path"=>"assets/glyphicons-halflings-white-ed38e147e3f6e976c0a7ad59e4d628f3"}
  Parameters: {"path"=>"assets/glyphicons-halflings-white-ed38e147e3f6e976c0a7ad59e4d628f3"}
  Rendered public/404.html (0.3ms)
  Rendered public/404.html (0.3ms)
Completed 404 Not Found in 17ms (Views: 3.4ms | ActiveRecord: 8.0ms)
Completed 404 Not Found in 17ms (Views: 3.4ms | ActiveRecord: 8.0ms)

它在开发中工作正常.如果我config.assets.compile = true在production.rb中设置它似乎工作正常 - 但我理解基于这个SO问题是非常糟糕的: 资产:precompile生成的文件与stylesheet_link_tag(缺少摘要)在最小的rails 4中生成的url不匹配现场

在Rails 3.2中,这对我来说不是问题.

任何帮助将不胜感激!

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有