Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Compass load path confusion #8

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

Compass load path confusion #8

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

Comments

@halian-vilela
Copy link

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

@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
Copy link

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

@renestalder
Copy link
Contributor

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

@Gridlok Brilliant that has worked a treat

@dfbfloyd
Copy link

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

@Kcko
Copy link

Kcko commented Sep 26, 2014

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

@wzup
Copy link

wzup 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants