【发布时间】:2012-05-01 21:59:00
【问题描述】:
处理 Rails 3.1 资产管道并失败的第一天!
这是资产抛出的一长串错误中的最新一个:在生产机器上预编译:
wrong number of arguments (1 for 2) for 'asset_path'
这发生在 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 可能很重要(不是升级)
【问题讨论】:
-
你的 .css 文件中对asset_path 的调用令人讨厌,在你的 .css 文件中找到所有 'asset_path' 调用并发布它们
-
很奇怪,我遇到了同样的错误。
asset-path需要 2 个参数,但第二个参数是什么。image有效,"yes"也有效,这是在哪里使用的?查看 github rails/sass-rails,它显示了 1 个参数 github.com/rails/sass-rails/…
标签: ruby-on-rails-3.1 twitter-bootstrap asset-pipeline