-
Notifications
You must be signed in to change notification settings - Fork 268
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
Fonts not loading with dart sass in Rails 7 #222
Comments
Did you find the solution? |
@Ozkee thanks for this. nothing worked until i found this issue and your comment. |
Actually @Ozkee's suggestion got the icons working for me, for example when i do
everything works, but I too am seeing some 404s in the console. Not causing me issues but wondering if i'm still missing something.
i checked and using an fa-regular icon is working. |
@joshuacronemeyer, I have changed _variables.scss from and fixed all routing errors. Just check your path matches. |
ok interesting @fschiefelbein so are you rebuilding a gem from your own fork or are you overriding this somehow in your app. I see the file and line you've changed, just wondering what's the best way to incorporate it. I wonder if you made a PR for this if they would merge it |
I came across this issue without using the gem, I am just using dartsass-rails and hosting fontawesome files. I changed my _varialble.scss file in my app. I didn't make a PR for this. |
This patch should help |
Thanks @Ozkee , the icons only started working after i added the configuration exactly as you indicated. Thanks you so much! |
@dima4p when i tried that patch it didn't do anything for me what i tried was changing my Gemfile like this
and then rebuilding my sass. I was still seeing the 404s. To clarify the icons are working for me, but wanted to get rid of the 404s |
What version of Rails did you use? I used 7.2. |
I have a Rails project that uses dartsass for SASS to CSS compilation.
Having followed through the installation instructions, the fonts are missing and it's giving a simple routing error in the rails server logs:
and the same for the woff2 file.
Unsurprisingly, when trying to use the fonts in a view (using ERB), it's not showing any content and the browser console displays the a similar 404 error:
The text was updated successfully, but these errors were encountered: