Closed Faisal-nfl closed 4 years ago
This shouldn't be a problem. Somehow you're including the CSS/JS uncompressed from a subfolder instead of whatever the default inclusion happens with Railtie.
@dblock thanks for response I created a sample project on github rails6_backend
its giving same error, have a look please. (swagger stuff is in the last commit)
UPDATE
after adding these two lines in app/assets/config/manifest.js
//= link grape_swagger_rails/application.css
//= link grape_swagger_rails/application.js
now it started to work, now I just want to confirm that is it the right way OR I messed up something which forcing me to add these lines?
For another project faced very same issue even after adding those lines in menifest.js
after trying different stuff for hours it started to work by addling these lines at top of app/assets/config/manifest.js
, its looks like this now
//= link grape_swagger_rails/application.css
//= link grape_swagger_rails/application.js
//= link_tree ../images
//= link_directory ../stylesheets .css
Looking at https://github.com/Faisal-nfl/rails6_backend/blob/master/app/assets/config/manifest.js it's pretty custom and doesn't include dependencies with require_tree .
. I think your solution is a good one. I'd appreciate a better explanation for the README in the https://github.com/ruby-grape/grape-swagger-rails#enabling-in-a-rails-api-project section. Want to contribute?
sure, I would love to. though I never contributed to such project. what I have to do
or anything else?
@dblock I tried to explain it and generated pull request. have a look if ok? pull request
with rails 6, lot of things changed but not sure what I have to do, it gives error
I did this but same issue, not sure what else I have to do