Reputation: 1513
I'm trying to serve some assets using the el gem but can't seem to get it to work. I've referred to another question posted here -- Assets in espresso breaks my app
My setup looks like this --
require 'e'
require 'el'
...
app = E.new(true){
assets_url '/pub', true
}
But hitting localhost:5252/pub/hello.txt (yes, this file exists) results in 404. What am I missing?
Upvotes: 0
Views: 58
Reputation:
You missed to append any paths to Sprockets environment.
http://espresso.github.io/Periphery/Assets.html#sprockets
Please try:
app = E.new(true){
assets_url '/pub', true
assets.append_path 'relative-path-to-static-files'
}
Upvotes: 1