Rails 3.1 and functionless jQuery

I found on Google lots of similar problems with jquery-ui and Rails 3.1 - specifically the images from jquery-ui library are not loaded. But I still can't find the right setup for the right functionality.

I followed for example this one thread at SO, but I also run the last command vendor/assets/images $ ln -s jquery_ui/ images , but unfortunately the images are not loaded. I have this structure of assets in my app:

app/assets/javascripts/application.js

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .

vendor/assets/images/jquery_ui

list of images

vendor/assets/javascripts/jquery-ui-1.8.17.custom.min.js

source of the library jquery-ui-1.8.17.custom.min

vendor/assets/stylesheets/jquery_ui/jquery-ui-1.8.17.custom.css

source of the library jquery-ui-1.8.17.custom.css

vendor/assets/stylesheets/vendor.css

/*
 *= require_self
 *= require_tree .
 */

Could anyone any tip, how could I fix this problem?


在你提到的SO线程中,有一个链接指向这可能是使用rails 3.1的最简单的解决方案。这里是链接:http://bibwild.wordpress.com/2011/12/08/jquery-ui-css-and-图像和护栏资产流水线/


Well, my solution:

into the directory vendor/assets/stylesheets/jquery_ui/ I added the directory images with all images of jquery-ui library and it already works.

But I still have the feel this is not the optimal solution and I would like to find a better way.

链接地址: http://www.djcxy.com/p/50004.html

上一篇: 为什么资产管道在Rails 3.1中放慢了localhost

下一篇: Rails 3.1和无功能的jQuery