i'm using the asset pipeline with rails 3.1 and less.
i have my images stored in app/assets/images.
in my .css.less file i have:
background-image: url('image.gif');
when the stylesheet gets compiled, it renders the path to the image as follows:
background-image: url('/images/image.gif')
when these images are requested through webrick, webrick is returning a 406 error code for those requests. manually requesting http://localhost/images/image.gif
also returns a 406.
however, a request to http://localhost/assets/image.gif
works just fine.
when i access the rails server through passenger, using the /images/image.gif
path works, as does /assets/image.gif
.
I also tried changing the file to be a .erb file and then using asset_path, with the same results.
I also tried to manually force the /assets
path by using this in the .css.less file:
background-image: url('/assets/image.gif')
but that still compiles the css file to use /images/image.gif