2013-09-01 34 views
1

我試圖使用安裝zurbs基礎框架羅盤:沒有這樣的框架:「基礎」

我已經安裝了這種寶石: zurb基金會(4.3.1)

從我的項目,我做的:

compass install foundation 

我得到:

No such framework: "foundation" 

如何實際使用已安裝的F- ramework?

回答

0

以下命令應該有所幫助,它也在文檔here中說明。

在「創建您的第一個項目」下找到。

$ compass create <project-name> -r zurb-foundation --using foundation 

我要指出,這是創建一個新的項目

如果它添加到現有的項目,或許你錯過了:

  • 添加需要「zurb基金」到你的config.rb文件
+0

我的確在使用一個已經存在的項目。該項目本身沒有ruby依賴關係。我只是使用指南針來抓取sass文件。所以,我沒有config.rb文件。在這種情況下,是否仍然可以使用sass軟件包? – davedave

+0

您確實需要一個config.rb,否則Compass不知道庫的位置。 – cimmanon

+0

是的,因爲cimmanon提到你需要一個config.rb文件。 你可以運行:「compass config」這將生成只是配置目錄和config.rb。 然後編輯config.rb文件以鏈接現有項目上的正確路徑。 –

1

該命令是:

compass install -r zurb-foundation foundation 

如果您已經zurb,基礎安裝,然後命令創建使用粉底一個新的項目是:

compass create <project-name> -r zurb-foundation --using foundation 

如果您已存在使用基金會的一個項目工作,SASS您需要的配置.rb文件在根目錄下:

require 'zurb-foundation' 
# Require any additional compass plugins here. 

# Set this to the root of your project when deployed: 
http_path = "/" 
css_dir = "stylesheets" 
sass_dir = "sass" 
images_dir = "images" 
javascripts_dir = "javascripts" 

# You can select your preferred output style here (can be overridden via the command line): 
# output_style = :expanded or :nested or :compact or :compressed 

# To enable relative paths to assets via compass helper functions. Uncomment: 
# relative_assets = true 

# To disable debugging comments that display the original location of your selectors. Uncomment: 
# line_comments = false 


# If you prefer the indented syntax, you might want to regenerate this 
# project again passing --syntax sass, or you can uncomment this: 
# preferred_syntax = :sass 
# and then run: 
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 
preferred_syntax = :scss 

確保您在頂部有require 'zurb-foundation'。這就是當我有一個已經存在的項目時爲我解決了這個問題。

+0

我和Susy有同樣的問題。當通過'compass:Gem :: LoadError on c [:2064]]安裝susy時出現此錯誤:無法激活susy-2.1.2,因爲sas s-3.2.19與sass(〜> 3.3)衝突。 0) 使用--trace運行以查看完整回溯 – evolutionxbox