ruby-on-rails-3.1 – Rails 3.1资产管道预编译失败,资产路径错误

ruby-on-rails-3.1 – Rails 3.1资产管道预编译失败,资产路径错误,第1张

概述第一天处理Rails 3.1资产管道而失败了! 以下是资产抛出的一系列错误中的最新信息:生产机器上的预编译: ‘asset_path’的参数数量错误(1表示2) 这发生在application.css文件中(我认为它是第一个尝试的文件). 这是我的application.css的内容 /* * This is a manifest file that'll automatically inclu 第一天处理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"

希望有所帮助

总结

以上是内存溢出为你收集整理的ruby-on-rails-3.1 – Rails 3.1资产管道预编译失败,资产路径错误全部内容,希望文章能够帮你解决ruby-on-rails-3.1 – Rails 3.1资产管道预编译失败,资产路径错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1274252.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存