Compass and SASS: Nothing to compile error

a 夏天 提交于 2019-12-21 17:33:14

问题


I'm getting so tired of this problem right now. I've been put off so many times trying to get this going. I feel this is my last attempt in solving what is wrong. Here goes:

I install compass

sudo gem update --system
sudo gem install compass

I create my test project (named test)

compass create test

That generates this

directory test/ 
directory test/sass/ 
directory test/stylesheets/ 
   create test/config.rb 
   create test/sass/screen.scss 
   create test/sass/print.scss 
   create test/sass/ie.scss 

I try to compile the project

compass compile [path/to/test]

All I get is this error message: "Nothing to compile. If you're trying to start a new project, you have left off the directory argument."

I try to google the problem but I can't find anything to help me. Anyone here that knows what's going on? Am i missing something important?

Im running OSX 10.6.8


回答1:


Check to see if you have special characters in your filepath. I had "[" and "]" wrapping a directory name. This apparently causes Compass to choke. Removing those fixed my issue.

Seeing as though there are lot's of different scenarios that lead to this same error message, it would seem that some additional info in the debugging output might be helpful. I spent a couple of hours on this, thinking it was my config.rb file! Oh well, hope this post saves someone else some time.




回答2:


Missing config.rb produces the same error. Create a minimal one in your basic sass directory containing just

sass_dir = '.'



回答3:


Carefully check the paths in your config.rb file. This error can be caused by any error in the path definitions that lead to a non-existent directory.



来源:https://stackoverflow.com/questions/11262335/compass-and-sass-nothing-to-compile-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!