Gaya / Retina-Sprites-for-Compass

Allow to use sprites in retina with Compass.
160 stars 31 forks source link

Problem generating the sprite in another path #10

Closed rafaellyra closed 9 years ago

rafaellyra commented 10 years ago

When I generate the sprite in another path the compass throw this error:

"Errno::ENOENT on line ["28"] of /Library/Ruby/Gems/2.0.0/gems/compass-0.12.6/lib/compass/sass_extensions/functions/image_size.rb: No such file or directory - app/assets/img/icons-2x-sfd1cfbb0ae.png Run with --trace to see the full backtrace"

Can I set a different path to generate the sprites?

Gaya commented 10 years ago

What do you mean by "generate the sprite in another path"? How are you using the plugin?

rafaellyra commented 10 years ago

My icons are on an path like: "app/assets/icons", and I am generating the sprite at "public/assets/images". The plugin is working but just when I dont change the: "imagesDir" compass property I have this error.

I am using the "grunt-contrib-compass" plugin to generate the sprites, the import is made thus: @import "vendor/Retina-sprites-for-Compass/retina-sprites"; and the scss icon file is thus: @include use-sprite('trash');

Gaya commented 10 years ago

For my understanding: your icons and icons-2x folders are not in your image folder?

rafaellyra commented 10 years ago

The icons and icons-2x are in the "app/assets/images", i think the problem is compass is looking for generated sprite on the same path to get the generated sizes, but they are on another path.

rafaellyra commented 10 years ago

I've found a issue on compass about my problem: https://github.com/Compass/compass/issues/1077, I keep looking for a solution.

rafaellyra commented 10 years ago

The solution is on this commit: https://github.com/Compass/compass/commit/c109bf8279a35bb17e2f56afe079f6ac79f0a46f But this is not on any stable compass version :(

Gaya commented 9 years ago

@rafaellyra I see the problem. That's an annoying one for you. I don't know if I can help you fix it by changing the mixin.

rafaellyra commented 9 years ago

I think something like this: https://github.com/Compass/compass/issues/1077#issuecomment-48431732, can solve the problem but I think this is not a problem of the mixin so I will wait a solution on Compass or try some alternatives for Compass.

Thanks for your help :+1:

Gaya commented 9 years ago

Thanks for participating and wanting to make this plugin better.