链接需要HTTP资产

时间:2013-12-16 10:06:59

标签: ruby-on-rails ruby sprockets precompile

我想知道是否可以通过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错误。

谢谢

1 个答案:

答案 0 :(得分:1)

Sprockets readme require注意到{{1}}采用了一条路径,并没有提及从HTTP中提取内容。

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

Same question but with JS...