Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosted documentation page broken due to non-precompiled assets #250

Open
hartsick opened this issue Feb 26, 2021 · 4 comments
Open

Hosted documentation page broken due to non-precompiled assets #250

hartsick opened this issue Feb 26, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@hartsick
Copy link
Contributor

hartsick commented Feb 26, 2021

When using latest Honeycrisp master on GetYourRefund, we saw the documentation page (/cfa/styleguide) was broken in development due to a non-precompiled asset calfresh_logo.png.

I think this was introduced by removing calfresh_logo from the styleguide assets (instead intending it only for documentation use, not as part of the library) but I'm not totally sure since it's still included in the normal place for images.

@hartsick
Copy link
Contributor Author

hartsick commented Feb 26, 2021

I think we might be able to fix this by just adding calfresh_logo.png here:

module Cfa
  module Styleguide
    class Engine < ::Rails::Engine
      isolate_namespace Cfa::Styleguide

      initializer "cfa-styleguide.assets.precompile" do |app|
        app.config.assets.precompile += %w(
          cfa_styleguide_main.css
          cfa_styleguide_main.js
          prism.css
          prism.js
          calfresh_logo.png
        )
      end

      config.generators do |g|
        g.test_framework :rspec
      end
    end
  end
end

But I want to test this out in a host project! There is also likely a more robust solution.

@hartsick hartsick added the bug Something isn't working label Feb 26, 2021
@hartsick
Copy link
Contributor Author

hartsick commented Feb 26, 2021

I wasn't able to reproduce this with a fresh install of latest gem master on CGLA project in development.

@hartsick
Copy link
Contributor Author

hartsick commented Mar 2, 2021

I was able to replicate this on CGLA in a deployed environment!

When visiting /cfa/styleguide (behind auth in our app), I get a 500 error. In Sentry I then see: "The asset "calfresh_logo.png" is not present in the asset pipeline."

@hartsick
Copy link
Contributor Author

This is now preventing me from running tests locally, though tests still pass on CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant