Menu icon Foundation
Rails asset precompile error: Undefined variable: "$column-gutter"

Hi All,

I am using the foundation-rails 5.0.2 gem. When I attempt to precompile assets (either locally or on deploy to Heroku) the rake task is throwing the following error:

rake aborted!
Undefined variable: "$column-gutter".

Folllowing some other posts I have moved @import 'foundation'; up to the top of my settings .scss file but the error persists

Any suggestions would be very much appreciated

rails.scssSass

Hi All,

I am using the foundation-rails 5.0.2 gem. When I attempt to precompile assets (either locally or on deploy to Heroku) the rake task is throwing the following error:

rake aborted!
Undefined variable: "$column-gutter".

Folllowing some other posts I have moved @import 'foundation'; up to the top of my settings .scss file but the error persists

Any suggestions would be very much appreciated

Whywouldi Register almost 6 years ago

I have the same problem. No idea how to fix.

Ben Saufley almost 6 years ago

Same problem. Not sure what the deal is, or why it would hit this problem here. It's referenced this variable through a number of other partials before it's gotten to this one. This only happens in precompile for production. In development with live updates, I don't get any errors.

Ben Saufley almost 6 years ago

Scratch that. It's caused by Rails trying to precompile partials (in this case, _tabs.scss) outside of the scope of their parent. Precompiler doesn't inherently recognize _ files as something not to touch unless imported.

David almost 6 years ago

Hi Ben,

How did you solve this issue?

I imported the individual foundation component files into application.css.scss but still see the Undefined variable: "$column-gutter" error.

Thanks

liam buell almost 6 years ago

I agree, what did you do to solve the issue ben? I'm having a similar issue when i try and compile in production.

Bitsynthesis over 5 years ago

I'm using Nanoc (static site generator) not Rails, but to solve this I just had to exclude the partials directory from compilation, and only compile normalize.scss and foundation.scss.