Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compass load path confusion #8

Closed
halian-vilela opened this issue Aug 21, 2012 · 16 comments

Comments

Projects
None yet
10 participants
@halian-vilela
Copy link

commented Aug 21, 2012

Well following up my problem in #4 ...

Now the problem is the load path of the assets used by Compass.

Specifically, i'm using the sprites mixins do manage my sprites. But, when I try to build I get the following error:

>>> Change detected at 01:30:03 to: screen.scss
Compass::SpriteException on line ["84"] of C: No files were found in the load path matching "social/*.png". Your current load paths are: D:\@Projetos\@@danca-pequena/images
Run with --trace to see the full backtrace

Look at the path. It's mixing slashes and backslashes, so it does not find my image folder because it's looking in an unexisting /images folder while it should look at \image. It then frozes the script and my stylesheet is not compiled at all!

I know this is very annoying, but compass works flawlessly outside sublime text. How could we solve this ?

Thanks

@renestalder

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2012

Do you have '@' in your file/pathnames? It may cause an escape of chars. Can you make a try with your example in a folder structure which is "UNIX Compatible"? For example "myfolder\my_project"

@ghost ghost assigned renestalder Aug 21, 2012

@halian-vilela

This comment has been minimized.

Copy link
Author

commented Aug 21, 2012

Well, I tested with a fresh folder first and it worked. No '@' nor strange glyphs in names.

Thought it would work and then moved my folder to the desktop. The problem arose again...

>>> Change detected at 09:12:37 to: screen.scss
Compass::SpriteException on line ["84"] of C: No files were found in the load path matching "social/*.png". Your current load paths are: C:\Users\Lian\Desktop\danca-pequena/images
Run with --trace to see the full backtrace

Do you have any idea of wich command does this concatenation? It says something about line 84, but from which file?

@renestalder

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2012

Strange. And when you remove the "-"? I know it's annoying, but most of errors come by the limitation to UNIX.

Also run with --trace and look there are more informations.

@halian-vilela

This comment has been minimized.

Copy link
Author

commented Aug 21, 2012

I don't think "-" would yield any error, I have a plenty of folders with hyphens and underlines in my linux machine with no problems at all.

Nevertheless, I removed and tested with --trace

The error persists and the traceback is as follows:

C:\Users\Lian\AppData\Roaming\Sublime Text 2\Packages\Compass Build System>compass watch --trace C:\Users\Lian\Desktop\dancapequena 
>>> Change detected at 13:16:02 to: screen.scss
Compass::SpriteException on line ["84"] of C: No files were found in the load path matching "social/*.png". Your current load paths are: C:\Users\Lian\Desktop\dancapequena/images
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/sprite_importer.rb:89:in `sprite_names'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/sprite_importer.rb:111:in `content_for_images'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/sprite_importer.rb:105:in `sass_engine'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/sprite_importer.rb:24:in `find'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/import_node.rb:51:in `block in import'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/import_node.rb:50:in `each'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/import_node.rb:50:in `import'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/import_node.rb:25:in `imported_file'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/import_node.rb:34:in `css_import?'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:137:in `visit_import'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:37:in `visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:18:in `visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:53:in `map'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:53:in `visit_children'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:37:in `block in visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb:37:in `visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:18:in `visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb:7:in `visit'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/tree/root_node.rb:20:in `render'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/engine.rb:300:in `_render'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/engine.rb:247:in `render'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:126:in `timed'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:139:in `block in compile'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/logger.rb:45:in `red'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:138:in `compile'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:118:in `compile_if_required'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:103:in `block (2 levels) in run'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in `each'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in `block in run'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:126:in `timed'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:100:in `run'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/watch_project.rb:147:in `recompile'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/watch_project.rb:68:in `perform'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/base.rb:18:in `execute'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/project_base.rb:19:in `execute'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:29:in `block in <top (required)>'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in `call'
  C:/Ruby192/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in `<top (required)>'
  C:/Ruby192/bin/compass:19:in `load'
  C:/Ruby192/bin/compass:19:in `<main>'

I don't know nothing about Ruby, so I cannot help in anything about it...

@renestalder

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2012

First, try to rename "C:\Users\Lian\AppData\Roaming\Sublime Text 2\Packages\ Compass Build System " to "C:\Users\Lian\AppData\Roaming\Sublime Text 2\Packages\ Compass "

Second, get the latest gems of Compass (v0.12.2) and SASS (v3.2.1).
gem update compass
gem update sass

See what happens and give me feedback, please.

@halian-vilela

This comment has been minimized.

Copy link
Author

commented Aug 24, 2012

@Nachtmeister I updated everything, including your package (so I didn't had to rename it by hand).

All other stuffs are working, but the Sprite error still persists. And it's just with the sublime package because, as always, if I use compass watch manually at the Windows CMD, everything is OK. So no ruby or compass problem here.

This makes me think that in some manner, the string concatenation done inside Sublime to build the path that goes to the %1 variable sent to compass.bat is messing up with the slashes and backslashes.

I've tried to rename the images path in config.rb to \\images just to see what happens, indeed the path that appears in the error shows C:\Users\Lian\Desktop\dancapequena\images instead of C:\Users\Lian\Desktop\dancapequena/images but the error (of course) is still raised.

Anything else we could do? Maybe you know something in the Sublime API that takes care of this stupid slashes...

@funkmasterflow

This comment has been minimized.

Copy link

commented Oct 14, 2012

Same error here. Any news how we can fix this?

@renestalder

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2012

So guys. I can say, got the Sprite error too, but not mit my Package. Got it with different other Tools too including direct compass watch in CMD. So I think it have something to do with the config according to a similar thread in Google Groups.

https://groups.google.com/forum/#!topic/compass-users/ZChxlt3gRsw

Maybe someone want to check it out and maybe find the problem.

@IbnSaeed

This comment has been minimized.

Copy link

commented Feb 18, 2013

I am also having the same issue

Compass::SpriteException on line ["84"] of d: No files were found in the load path matching "images/icon/*.png". Your current load paths are: D:\www\project/images
Run with --trace to see the full backtrace

@thesainthell

This comment has been minimized.

Copy link

commented Feb 19, 2013

I know this is really just a work around but I played a bit with the .bat file. This seems to work, at least for my use case:
cd "%1"
compass watch
pause

@telekineticyeti

This comment has been minimized.

Copy link

commented Mar 30, 2013

I'm also running into this problem:
No files were found in the load path matching "global/*.png". Your current load paths are: B:\projects\mindresin/img
[Finished in 1.6s with exit code 1]

I've followed the various advice in this thread with no luck

@telekineticyeti

This comment has been minimized.

Copy link

commented Mar 30, 2013

After a lot of hunting I located a fix that worked for me - a modification to the gem that resolves a filename escaping issue with compass:

Compass/compass@58babac

It requires editing sprite_importer.rb.

For me this was located in my default ruby install directory:
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\compass-0.12.2\lib\compass\sprite_importer.rb

Comment out the lines in red, replace with the lines in green. Good luck!

@loonytoon

This comment has been minimized.

Copy link

commented Apr 23, 2013

@Gridlok Brilliant that has worked a treat

@dfbfloyd

This comment has been minimized.

Copy link

commented Feb 23, 2014

@gridlock This worked perfectly for me as well. Thank you!

@Kcko

This comment has been minimized.

Copy link

commented Sep 26, 2014

@Gridlok works, u save my life ;-) !

@wzup

This comment has been minimized.

Copy link

commented Jan 23, 2015

Not working for me.
Windows 7 64bit
Ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
Gem 2.4.5
Compass 0.12.6 (Alnilam)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.