2011-06-15 123 views
0

我已經使用了Rails的vanilla Blueprint,它工作得很好。但是當我嘗試通過指南針使用它時,它(網格系統)無法正常工作。Rails 3 + Compass + Blueprint無法正常工作

這裏是我下面的步驟:

羅盤初始化軌

當我去創建模板:

!!! 
%html 
    %head 
    %title Test Project 
    = stylesheet_link_tag :all 
    = javascript_include_tag :defaults 
    = stylesheet_link_tag 'screen.css', :media => 'screen, projection' 
    = stylesheet_link_tag 'print.css', :media => 'print' 
    /[if lt IE 8] 
    = stylesheet_link_tag 'ie.css', :media => 'screen, projection' 
    = csrf_meta_tag 
    %body 
    .container 
     .span-24 
     The header 
     .span-4 
     The first column 
     .span-16 
     The center column 
     .span-4.last 
     The last column 
     .span-24 
     The footer 

這一切都爲不同的藍圖平原。我谷歌搜索,並遇到一些教程/博客,然後跟着它仍然不工作。以上,我嘗試了一些變化:

compass init rails --using blueprint 
compass init rails . --using blueprint 
compass init rails . --using blueprint/semantic 

然後在教程之一,我發現,body.bp會的工作,如:

%body.bp 
    #container 

它確實改變了格式化了一點,但電網仍然沒有工作。請幫忙。

+0

我試着通過移除haml-rails gem並保持最小的一組寶石。甚至嘗試與乘客。仍然沒有運氣。我必須失去一些明顯的東西。請幫忙。 – RubyDev 2011-06-16 04:32:59

回答

2

終於可以做到了。

%body.bp.two-col

+0

從那時起,我通過擴展提供的雙列布局完成了三列設計。指南針真的很酷! – RubyDev 2011-06-16 19:08:07