swagger_engine icon indicating copy to clipboard operation
swagger_engine copied to clipboard

assets:precompile not working

Open bandtank opened this issue 10 years ago • 2 comments

reset.css and print.css aren't generated (I know you already know because of a comment on a commit), but I think the problem has to do with the path. I cloned this repo, modified lib/swagger_engine/engine.rb as follows:

       app.config.assets.precompile += %w(/absolutepath/print.scss /absolutepath/reset.scss)

and it worked perfectly. I've tried using relative paths, but nothing I've tried has worked. Do you know how to do that?

bandtank avatar Aug 21 '15 15:08 bandtank

One thing to note is that there's a big difference between production and development mode. If you don't turn on serve_static_files to true in config/environments/production.rb, it won't work. We have Nginx pointing to our API's public folder, which serves the same purpose, but this might be a helpful tip for someone.

bandtank avatar Aug 21 '15 16:08 bandtank

Interestingly this seems to have been catered for in the Engine, but is not working

https://github.com/batdevis/swagger_engine/blob/master/lib/swagger_engine/engine.rb#L11-L13

scarroll32 avatar Feb 06 '17 13:02 scarroll32