Question

I would like to know if it's possible to require some assets over HTTP, eg:

/*
 * 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'
*/

I get a Sprockets::FileNotFound error with this snippet.

Thank you

Was it helpful?

Solution

The Sprockets readme notes that require takes a path, and makes no reference to pulling things off HTTP.

The JurassicCoffee project for .NET appears to have added the ability to load files over HTTP.

Same question but with JS...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top