Rails3.使用Compass时如何查看错误?

发布于 2024-10-19 11:25:54 字数 1099 浏览 0 评论 0原文

Rails 3.我安装了compass,然后开始修改application.html.haml以将其从erb转换为haml。

到目前为止,它还不起作用。当我刷新页面时,布局不会呈现。它只是渲染控制器视图(即 erb)的内容。

这是我第一次使用Compass,所以可能代码是错误的。我的问题是,在哪里可以看到错误、警告等?

我用的是乘客。

编辑:

代码是

!!! 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

我可以使用制表符代替空格吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

喵星人汪星人 2024-10-26 11:25:54

加载页面时通常会出现指南针错误。如果页面加载正常,第二个选项是查看页面的 HTML 源代码,单击加载到页面中的样式表,然后查看样式表本身是否打印错误。 运行命令来预编译 sass 表

compass watch .

最后,您还可以通过在根目录中 。编译错误将被写入该命令的输出

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文