无法获取样式表显示在ruby应用程序 [英] Can't get stylesheet to show up in ruby app

查看:149
本文介绍了无法获取样式表显示在ruby应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的layouts目录中的application.erb文件中有以下代码。我有在public / stylesheets蓝图目录,但链接不工作。它说它应该位于< link href =/ assets / blueprint / screen.cssmedia =screen =stylesheettype =text / css/& 但没有什么。

I have the following code in my application.erb file in my layouts directory. I have the blueprint directory inside of public/stylesheets however the link doesn't work. It says it is supposed to be located at <link href="/assets/blueprint/screen.css" media="screen" rel="stylesheet" type="text/css" /> But There is nothing there.

<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
    <%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>


推荐答案

= stylesheet_link_tag/ blueprint / screen%> &将 screen.css 置于以下子级中:

use this<%= stylesheet_link_tag "/blueprint/screen" %> & place your screen.css in the following heirarchy:

app / assets / stylesheets / blueprint / screen.css

这篇关于无法获取样式表显示在ruby应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆