【问题标题】:Sprockets require asset over HTTPSprockets 需要基于 HTTP 的资产
【发布时间】:2014-01-03 16:16:55
【问题描述】:

我想知道是否可以通过 HTTP 要求一些资产,例如:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require 'http://assets.domain.com/stylesheets/style.css'
*/

我收到一个 Sprockets::FileNotFound 错误与这个 sn-p。

谢谢

【问题讨论】:

    标签: ruby-on-rails ruby sprockets precompile


    【解决方案1】:

    Sprockets readme 指出 require 采用路径,并且没有提及从 HTTP 中提取内容。

    .NET 的 JurassicCoffee 项目似乎增加了通过 HTTP 加载文件的能力。

    Same question but with JS...

    【讨论】:

      猜你喜欢
      • 2018-04-05
      • 1970-01-01
      • 2013-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多