【问题标题】:Stylesheet_link_tag is broken, paths to files not working, can't figure out why for the life of me. Any ideas?Stylesheet_link_tag 已损坏,文件路径无法正常工作,我无法弄清楚为什么。有任何想法吗?
【发布时间】:2022-05-02 22:56:21
【问题描述】:

我在 Rails 3.1 中,config,assets.enabled 在 config/application.rb 中为 true

我有这些不起作用,我不知道我做错了什么

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

这也不起作用(图像不显示图像的缩写路径或完整路径)

<%= image_tag("logo.png", :alt => "Sample App", :class => "round") %>

【问题讨论】:

    标签: css ruby-on-rails ruby ruby-on-rails-3.1


    【解决方案1】:

    你把你的图片放到assets/images目录了吗?

    【讨论】:

      猜你喜欢
      • 2014-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-29
      • 1970-01-01
      • 2010-11-16
      • 2016-05-10
      相关资源
      最近更新 更多