I upgrade my Rails application (3.2.17) to sass, and I run undefined variable errors during resource precompilation. I use @import to include my fragments in the master.scss file. This setting works fine locally, but the errors in precompilation: The only way to get around errors is to use @import fragments in fragments that reference mixins and variables defined in the first fragment.
For example: I have @import 'fonts' and 'buttons' in master.scss, and then I have to @import 'fonts' a second time in 'buttons' because it uses the variable defined in 'fonts'. This results in a precompilation error, but it is not ideal, because instead of one instance of the βfontsβ loaded into the application, there are now two.
@importing all fragments only once in master.scss works locally when I don't precompile. There must be a solution to this. Any thoughts?
source share