问题
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' %>
回答1:
use this<%= stylesheet_link_tag "/blueprint/screen" %>
& place your screen.css
in the following heirarchy:
app/assets/stylesheets/blueprint/screen.css
来源:https://stackoverflow.com/questions/9123661/cant-get-stylesheet-to-show-up-in-ruby-app