2010-08-18 35 views
3

我在現有站點上使用Sass並決定讓Compass運行在Win7x64上。 Ruby,HAML,Compass都安裝好了(afaik)。指南針運用Compass項目之外的相對路徑運行dir

我有一個項目在c:\project與靜態文件服務c:\project\static與目錄結構必須保持相同。我走進c:\project\static跑這樣的:

compass create css-compass 

這導致了下面的目錄結構

c:\project\static\css (previously existed; output css) 
c:\project\static\css-sass (previously existed; source css) 
c:\project\static\css-compass (the new compass dir created by compass)  

這裏是我的config.rb:

# Require any additional compass plugins here. 
# Set this to the root of your project when deployed: 
http_path = "/" 
css_dir = "..\\css" 
sass_dir = "..\\css-sass" 
images_dir = "images" 
javascripts_dir = "javascripts" 

當我去c:\project\static和運行compass watch compass-css,出現以下錯誤:

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

但是,如果我在c:\project\static\css-compass內部創建符號鏈接從css->..\csscss-sass => ..\css-sass然後一切正常。

什麼是什麼?

回答

7

捂臉

顯然,你需要設置relative_assets = true在config.rb文件。爲什麼這不是我的默認。好吧!