Asset Pipeline and Compass sprites

Hi There

I am trying to get Middleman to generate a sprite from images loaded in a gem

I have followed the instructions on the asset pipeline page and have the javascript loading from the gem, using sprockets.import_asset.

I can access any of the images with the image_tag helper:

<%= image_tag 'ui/twitter.png' %>

but when I try to generate a sprite, I get a “No files were found in the load path matching ui/*.png” error.

sprite-map("ui/*.png");

How can I include these in my sprite?

You might be better creating an issue at https://github.com/middleman/middleman/issues

Can you post a small example app?

Adding this to my config.rb got it working:

compass_config do |config|
    images = Gem::Specification.find_by_name("my-gem").gem_dir + "/images"
    config.sprite_load_path << images
end

Github Issue: https://github.com/middleman/middleman/issues/981