2012-05-01 13 views
4

Rails 3.1のアセットパイプラインを処理して敗北した1日目!Rails 3.1アセットパイプラインasset_pathの間違った引数でプリコンパイルが失敗する

これは私が考えている(application.cssファイルで発生wrong number of arguments (1 for 2) for 'asset_path'

が最初である:生産機械のプリコンパイル:ここ

は資産によってスローされたエラーの長いラインで最新のものです1つは試みている)。

これは私の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を使用していることを言及することが重要であるかもしれませんです(アップグレードしない)

+0

を助け

asset-url("rails.png", image) # becomes url(/assets/rails.png) asset-path("rails.png", image) # becomes "/assets/rails.png" 

希望をファイルとそれらを投稿 – RadBrad

+0

非常に奇妙な、私は同じエラーが発生しています。 'asset-path'は2つの引数を期待していますが、第2引数は何ですか? 'イメージ'が動作し、 ''はい ''も動作します、これはどこで使われますか? github rails/sass-railsを見ると、1つの引数https://github.com/rails/sass-rails/search?utf8=%E2%9C%93&q=asset-path – Chemist

答えて

3

は、あなたのbootstrap_and_overrides.css.lessを見てみましょうあなたのapplication.cssファイルのスプロケット(*= require_tree)に含まれています。

@iconSpritePathまたは@iconWhiteSpritePathを含めると、エラーが発生していると思います。

編集: メソッドは、2つの引数が必要です。それはすべての「asset_path」はあなたの.cssに呼び出しを見つけ、barfingされ、あなたの.cssファイルにasset_pathを呼び出します

+0

が表示されますあなたが参照しているものが含まれています。しかし、奇妙な点は、エラー状態のasset_pathは2つの引数を必要とし、1つだけです。私のアプリのすべてのasset_pathインスタンスは1つの引数を持ち、この関数は1つの引数しか取らないので、 – Khash

関連する問題