当前位置: 动力学知识库 > 问答 > 编程问答 >

Rails couldn't find file jquery purr

问题描述:

I'm using rails 3.2.3

I included the following files in my application.js

//= require jquery.purr

//= require best_in_place

It now looks like this

//= require jquery

//= require jquery_ujs

//= require jquery.purr

//= require best_in_place

//= require_tree

I'm getting an error saying:

couldn't find file 'jquery.purr'

网友答案:

Rails doesn't magically know where to download scripts from.

You have to download and put them in the app/assets/javascript directory.

jQuery Purr is found here: http://code.google.com/p/jquery-purr/

网友答案:

If you're using the current HEAD of the best_in_place gem, you don't need to download jquery.purr. It's included in the gem as best_in_place.purr. So you would add the following to your application.js:

//= require jquery
//= require best_in_place
//= require best_in_place.purr

Note that this does not give decent CSS for the purr notification. For that you can do something similar to what the best_in_place test app does (lines 62 through 87 at the time of posting).

分享给朋友:
您可能感兴趣的文章:
随机阅读: