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

Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196

2 Answers2

0

Perhaps just try linking to the image directly in your CSS file but leave the files where they are. If I'm correct, it should know to look in the assets/images folder anyways.

Instead of...

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

Try just

url(ui-bg_inset-hard_100_fcfdfd_1x100.png)

user1015523
  • 334
  • 2
  • 6
  • 15
0

I prefer to keep the jQuery UI files as they are, and put the ui images under public/stylesheets/images. That way upgrading the jQuery UI stylesheet is easier, you can just swap it out with your new one.

SooDesuNe
  • 9,880
  • 10
  • 57
  • 91