administrate: Undefined variable: "$bold-font-weight".
Hi all
I’m using the gem directly from Github and if I run rails generate administrate:assets:stylesheets
. I get the following error Undefined variable: "$bold-font-weight".
when trying to load anything in /admin
I also noticed that some of the generators seem to produce different code from the default code. For example ‘rails generate administrate:views:new Client’ the forms all look broken.
Any ideas how to resolve this?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 47 (11 by maintainers)
@nickcharlton what’s the solution?
I was able to solve the issue by creating an
app/assets/stylesheets/public
directory and moving everything that used to live inapp/assets/stylesheets
(pre-Administrate) toapp/assets/stylesheets/public
. Then I changedrequire_tree .
inapp/assets/stylesheets/application.css
torequire_tree ./public
.You could of course call the
public
directory anything you want.This is not very helpful solving the actual problem but for those like me who need to make progress, I worked around the issue by importing the variables at the top of my application.scss
@import 'administrate/library/variables';
Note that this required me to copy-paste two values from the included Bourbon library in app/assets/stylesheets/administrate/library/_variables.scss
@drinks Does it work if you remove the
require_tree .
?Is this still an active issue? If it is, v0.7.0 was just released with lots of changes to the Sass that perhaps fixes it?
remove *= require_tree from the main application.css helped me loads other stylesheet and therefore solved the problems