serving static files with Ruby Espresso -


i'm trying serve assets using el gem can't seem work. i've referred question posted here -- assets in espresso breaks app

my setup looks --

require 'e' require 'el' ...  app = e.new(true){       assets_url '/pub', true } 

but hitting localhost:5252/pub/hello.txt (yes, file exists) results in 404. missing?

you missed append paths 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' } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -