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

JS Not working with new rails app #965

Closed
muriloime opened this issue Jan 6, 2022 · 1 comment
Closed

JS Not working with new rails app #965

muriloime opened this issue Jan 6, 2022 · 1 comment

Comments

@muriloime
Copy link

Hi all,

I followed the instructions as per https://primer.style/view-components/#installation in a new rails 7 app, but I get the following error

The asset "primer.js" is not present in the asset pipeline.

when adding javascript_include_tag. I guess for rails apps using sprockets it is needed to include in the documentation to add a primer line into manifest.js file too, however in this gem I only see exposed primer_view_components.js, not primer.js.

Many thanks

@muriloime muriloime changed the title Not working with new rails app JS Not working with new rails app Jan 6, 2022
@camertron
Copy link
Contributor

Hey @muriloime, thanks for bringing this up, and apologies for missing it! As you discovered, the fix is to use <%= javascript_include_tag("primer_view_components") %> instead. The docs should be fixed once this PR lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants