2012-03-31 8 views
0

Rails 3.1を使用していて、jQuery拡張機能を使用しようとするとエラーが発生します。rails coffescript&hamlにエラーが含まれています

kintouch.js.coffee

jQuery -> 
    $('.best_in_place').best_in_place() 

index.html.haml

= best_in_place contacts[0].label, :name, :display_as => :header_short, 
     :inner_class => "span2" 

application.js

//= require jquery 
//= require jquery_ujs 
//= require jquery.purr 
//= require best_in_place 
//= require_tree . 

kintouch.jsエラー

は、しかし、私はこのようなJavaScriptの拡張機能へのハードリンク場合:

%script{:src => "https://raw.github.com/bernat/best_in_place/master/lib/assets/javascripts/best_in_place.js", :type => "text/javascript"} 

すべてが動作しているようです。レンダリング

私のスクリプトファイル:

enter image description here

ありがとう!

+0

エラーの説明を更新しました。おかげで –

+0

私のjQueryアドオンのすべてが壊れています... –

+0

あなたのアプリにbest_in_place.jsをどのようにインストールしましたか? –

答えて

0

jQueryが2回ロードされているため、ブートストラップに乗っていました。

関連する問題