Build fails with bootstrap and less but render works

Hi,

I am using bootstrap from source in my middleman site because I want to configure the look and feel using less variables. So things look like:

my_style.less :

@import "../bootstrap/less/bootstrap.less";
// customize bootstrap
@brand-primary: #3333AF;
... further customisation

bootstrap.less

// Core variables and mixins
@import "variables.less";
@import "mixins.less";

// Reset
@import "normalize.less";
... and the rest of the usual bootstrap file

in my Gemfile I have

...
# Required for compilation of bootstrap less files in css
gem "less"
...

and everything works fine when using bundle exec middleman server. But when I try bundle exec middleman build I get:

at /Library/Ruby/Gems/2.0.0/gems/less-2.5.0/lib/less/js/lib/less/parser.js:604:31: variable @alert-padding is undefined (Less::ParseError)
	from /Library/Ruby/Gems/2.0.0/gems/less-2.5.0/lib/less/parser.rb:100:in `block in to_css'
	from /Library/Ruby/Gems/2.0.0/gems/less-2.5.0/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
	from /Library/Ruby/Gems/2.0.0/gems/less-2.5.0/lib/less/java_script/v8_context.rb:88:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/less-2.5.0/lib/less/java_script/v8_context.rb:88:in `Locker'
    ...

however, @alert-padding is defined in variables.less. I don’t understand what is different between the build environment and the regular one here. I’ve deactivated all build specific options in config.rb (css minifying in particular, just in case that matters).

Thanks in advance for any pointer. It is frustrating to not be able to deploy!

In case that helps, here is a repository of the project, so you can test this out: https://github.com/jiho/work

Same problem. Any update?

Problem still there for me too. Haven’t been able to solve it and therefore haven’t been able to deploy…