Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

css - Unable to compile an existing project because Compass can't find it

I just installed the foundation in my application base directory by executing the following command:

compass create myprojectname -r zurb-foundation --using foundation

Now I have open the sass/_settings.scss file and I have un-comment the 66th line that is the following:

$include-html-classes: true;

finaly, I try to compile my foundation project in order to include the html classes by executing the following command:

compass compile

but I am getting the following result in my command prompt:

Nothing to compile. If you're trying to starta new project, you have left off the directory argument.
Run "compass -h" to get help.

also, based on this page : http://foundation.zurb.com/old-docs/f3/compass.php I try to compile my scss code by using the command:

compass watch

but again I am getting the same message as with compile argument next to compass.

Note: I am executing the above commands in the same directory I run the first command for the foundation project creationg.

Note: I am very new user on compass, sass, foundation framework. Actually, today is the first time I am using them, so I am not expirienced user. Please be kind with me :)

Is there anybody to help me with that ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

When you use compass create [directory_name], Compass creates your project within ./[directory_name] relative from your current directory (running compass create without the directory name would have created the project in the current directory). In order to compile or watch a Compass project, you need to do either of the following things:

  • Tell Compass where your project is via compass compile [path_to_config.rb]
  • Change to the directory where config.rb is found and run compass compile

Alternately, you could move your config.rb to where you want to run your command. Just make sure you edit the paths to directories configured within said file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...