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

No route matches [GET] "/assets/fonts/glyphicons-halflings-regular.woff2" #927

Open
slhck opened this issue Dec 6, 2017 · 0 comments
Open

Comments

@slhck
Copy link

slhck commented Dec 6, 2017

I am using version 4.0.0 with Rails 5.1.4 and have Glyphicons enabled in the bootstrap_and_overrides.css.less file:

@import "twitter/bootstrap/bootstrap";

// Glyphicons are not required by default, uncomment the following lines to enable them.
@glyphiconsEotPath: font-url("glyphicons-halflings-regular.eot");
@glyphiconsEotPath_iefix: font-url("glyphicons-halflings-regular.eot?#iefix");
@glyphiconsWoffPath: font-url("glyphicons-halflings-regular.woff");
@glyphiconsTtfPath: font-url("glyphicons-halflings-regular.ttf");
@glyphiconsSvgPath: font-url("glyphicons-halflings-regular.svg#glyphicons_halflingsregular");

@import "twitter/bootstrap/glyphicons.less";

However the path loaded from the generated CSS is not correct:

No route matches [GET] "/assets/fonts/glyphicons-halflings-regular.woff2"

When I add this code (which I found here) to the bootstrap_and_overrides.css.less, it works:

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('/assets/glyphicons-halflings-regular.eot');
  src: url('/assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('/assets/glyphicons-halflings-regular.woff') format('woff'), url('/assets/glyphicons-halflings-regular.ttf') format('truetype'), url('/assets/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}

Clearly, this is a hack. What would be the proper solution?

PS: This is in the development environment.

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

1 participant