Closed joergd closed 10 years ago
I'm wrestling with the same issue. Right now I have worked around this specific issue by modifying the following variable in _variables.scss:
//$icon-font-path: "twitter/" !default;
$icon-font-path: "/" !default;
However I now have another issue where I just get the error codes (square boxes) vs the proper icons.
I'm running with Rails 4 for reference.
One more update ... winner for me was to update the following in _variables.scss:
$icon-font-path: "/assets/twitter/" !default;
It seems like we should be able to do this via a variable override locally however I can't get it to work (tried to include in application.css.scss to no avail).
Still hacking through this one. I did end up getting the override to work in my application.css.scss
with something like the following:
// application.css.scss
....
// Override the default icon path
$icon-font-path: "/assets/twitter/";
@import "twitter/bootstrap";
Works like a charm in development however now deploying to production I'm getting hit again without being able to find the woff files.
ActionController::RoutingError (No route matches [GET] "/assets/twitter/glyphicons-halflings-regular.ttf")
Wondering if it is because the unique strings are missing from the url? Actual files are under assets/twitter
:
glyphicons-halflings-regular-24dfb40c91db789b8b8faba6886ac1ef.svg
glyphicons-halflings-regular-4b2130768da98222338d1519f9179528.ttf
glyphicons-halflings-regular-7a07f26f72466361ac9671de2d33fd1c.woff
glyphicons-halflings-regular-ab2f6984951c07fd89e6afdefabd93c7.eot
This error occurs when you were running rake assets:precompile
once in development mode. To fix it, delete all files in public/assets and run RAILS_ENV=production rake assets:precompile
I'm experiencing this same issue, 404 error on load of glyphicons .woff file in production only. Works great in development with zero tweaking.
I've tried the following, to no avail:
// adding this:
$icon-font-path: "/assets/twitter/" !default;
// before this:
@import "twitter/bootstrap";
// at the top of application.css.scss
and also as @maltefiala suggested, I deleted the contents of public/assets before pushing to production then ran RAILS_ENV=production rake assets:precompile
in production.
Still getting 404 error on load of glyphicons in production after these tweaks. Any help would be much appreciated!
Bumping this - I'm experiencing the same issue. Has anybody found a decent resolution? https://github.com/anjlab/bootstrap-rails/issues/74#issuecomment-29169323 didn't seem to help when I am deploying.
@asanger, sorry. But this gem in no longer supported. You should use official bootstrap sass gem.
I get a 404 error in my browser dev tools when I try to use glyphicons. It can't find the woff files in /fonts/twitter ...
I am in development. Is there anything I need to do?