0

I'm trying to use the jQuery UI Slider with my rails 3 app. I've downloaded a theme and put the css file in app/assets/stylesheet and I put all the images in app/assets/images.

When I load a page with a slider, I get an error that it can't find an image:

GET http://10.1.10.100:3000/assets/images/ui-bg_glass_45_0078ae_1x400.png 404 (Not Found)

That file is in app/assets/images/ and the css file has been edited to point to ../images/<image>

Is there something else I need to do to make a jQuery slider work with Rails 3?

gist with the files: https://gist.github.com/2355571

4

2 回答 2

0

我更喜欢保持 jQuery UI 文件原样,并将 ui 图像放在public/stylesheets/images. 这样升级 jQuery UI 样式表就更容易了,你可以把它换成你的新样式表。

于 2012-04-10T23:47:54.363 回答
0

也许只是尝试直接在您的 CSS 文件中链接到图像,但将文件保留在原处。如果我是正确的,它应该知道无论如何都要查看 assets/images 文件夹。

代替...

url(../images/ui-bg_inset-hard_100_fcfdfd_1x100.png)

试一试

url(ui-bg_inset-hard_100_fcfdfd_1x100.png)

于 2012-04-10T23:37:08.173 回答