Search code examples
ruby-on-railshamlcompass-sass

Rails3.How do I see the errors when I use Compass?


Rails 3. I installed compass and I started to modify application.html.haml to convert it from erb to haml.

So far, it does not work. When I refresh the page the layout do not get rendered. It just render the contents of the controllers' view (which is erb).

It is the first time I use Compass, so probably the code is wrong. My question is, where do I see the errors, warning, etc?

I use Passenger.

Edit:

The code is

!!! 5
%html       
  %head
  = stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
  = stylesheet_link_tag 'compiled/print.css', :media => 'print'
  /[if IE]
  = stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
  %title 
  DaVinci - = yield(:title) || " Inicio"
  = stylesheet_link_tag 'compiled/modern'
  = javascript_include_tag :defaults
  = csrf_meta_tag

  %body                
    #header
      .navlist
      %ul
        %li
          = link_to 'Inicio', root_path
        %li
          = link_to 'Administrar', configuration_index_path
        %li
          = link_to 'Tareas', tasks_path
        %li
          = link_to 'Documentos', files_path
        %li
          = link_to 'Correo', emails_path
      = yield(:nav)                    
   #contents
     = yield

Can I use Tabs instead of spaces?


Solution

  • Compass errors usually show up when you load the page. If the page loads fine, a second option is to view the HTML source of the page, click on the stylesheet loaded into the page, and see if an error is printed into the stylesheet itself. Finally, you can also precompile your sass sheets by running the command

    compass watch .
    

    in your root directory. Compilation errors will be written as the output of this command