ruby-on-rails-3.1 – Rails 3.1资产管道预编译失败,资产路径错
发布时间:2020-12-17 02:17:46 所属栏目:百科 来源:网络整理
导读:第一天处理Rails 3.1资产管道而失败了! 以下是资产抛出的一系列错误中的最新信息:生产机器上的预编译: ‘asset_path’的参数数量错误(1表示2) 这发生在application.css文件中(我认为它是第一个尝试的文件). 这是我的application.css的内容 /* * This is a
第一天处理Rails 3.1资产管道而失败了!
以下是资产抛出的一系列错误中的最新信息:生产机器上的预编译: ‘asset_path’的参数数量错误(1表示2) 这发生在application.css文件中(我认为它是第一个尝试的文件). 这是我的application.css的内容 /* * This is a manifest file that'll automatically include all the stylesheets available in this directory * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * the top of the compiled file,but it's generally better to create a new file per style scope. *= require_self *= require_tree . */ .account-badge { background-color: #B94A48 !important } .centered { float: none; margin-left: auto; margin-right: auto; } .container[role="main"] { padding-bottom: 300px; } .page-footer { border-top: 1px solid #EEEEEE; padding-top: 17px; } 可能很重要的是我在一个全新的应用程序中使用twitter-bootstrap-rails(而不是升级) 解决方法
查看一下bootstrap_and_overrides.css.less文件,该文件包含在application.css文件的sprockets(* = require_tree)中.
我想通过包含@iconSpritePath或@iconWhiteSpritePath来定位错误. 编辑: asset-url("rails.png",image) # becomes url(/assets/rails.png) asset-path("rails.png",image) # becomes "/assets/rails.png" 希望有所帮助 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |