batdevis/swagger_engine

assets:precompile not working

bandtank opened this issue · 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?

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.

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