Rails 3.1 serving images from vendor/assets/images

Viewed 30469

I am trying to put some external images (used by a jQuery plugin) to vendor/assets/images in my Rails 3.1 app. Problem is that when I try something like:

<%= image_tag "ui-bg_flat_75_ffffff_40x100.png" %>

I get an error:

No route matches [GET] "/assets/ui-bg_flat_75_ffffff_40x100.png"

I checked my Rails.application.config.assets.paths and it list these dirs:

..../app/assets/images
..../app/assets/javascripts
..../app/assets/stylesheets
..../vendor/assets/images
..../vendor/assets/stylesheets
..../.rvm/gems/ruby-1.9.2-p180@mygems/gems/jquery-rails-1.0.9/vendor/assets/javascripts

As you can see /vendor/assets/images is listed there. If I put my image to app/assets/images everything works.

I thought that new asset pipeline was supposed to go through all assets dirs and serve requested file wherever it finds it.

Does anyone knows what's the problem here?

4 Answers

Maybe you should create another folder in /assets/images. You make a name 'images' and then you just copy all jquery-ui image and paste on folder 'images' that you create before. Hopefully this will help you.

Related