Sass-convert dying with undefined method 'build' for module `Less::StyleSheet::Mixin4' (NameError) #122

nemlah opened this Issue Jun 22, 2011 · 20 comments


None yet

nemlah commented Jun 22, 2011

/home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/less.rb:40:in alias_method': undefined methodbuild' for module Less::StyleSheet::Mixin4' (NameError) from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/less.rb:40:inmodule:Mixin4'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/less.rb:14:in <module:StyleSheet>' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/less.rb:9:inmodule:Less'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/less.rb:5:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire'
from internal:lib/rubygems/custom_require:29:in require' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:624:inblock in process_file'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/util.rb:297:in silence_sass_warnings' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:619:inprocess_file'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:589:in block in process_directory' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:564:inglob'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:564:in process_directory' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:529:inprocess_result'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:41:in parse' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/lib/sass/exec.rb:21:inparse!'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/gems/sass-3.1.3/bin/sass-convert:7:in <top (required)>' from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/bin/sass-convert:19:inload'
from /home/nemlah/.rvm/gems/ruby-1.9.2-p136/bin/sass-convert:19:in `


Looked into the lessc gem but couldn't find the module it is trying to patch..


chriseppstein commented Jun 24, 2011

Is ruby less installed and what version do you have?

r38y commented Jun 30, 2011

I'm getting the same error with less 2.0.5. I'm trying to dig into it to figure it out. Is there a version of less that is known to work with this?

Yep, same here.. tried less 2.0.5 - 2.0.2 and sass 3.1.2 - 3.1.4

/Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/less.rb:40:in `alias_method': undefined method `build' for module `Less::StyleSheet::Mixin4' (NameError)
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/less.rb:40:in `<module:Mixin4>'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/less.rb:14:in `<module:StyleSheet>'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/less.rb:9:in `<module:Less>'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/less.rb:5:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/exec.rb:624:in `block in process_file'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/util.rb:297:in `silence_sass_warnings'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/exec.rb:619:in `process_file'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/exec.rb:538:in `process_result'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/exec.rb:41:in `parse'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/lib/sass/exec.rb:21:in `parse!'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/gems/sass-3.1.4/bin/sass-convert:7:in `<top (required)>'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/bin/sass-convert:19:in `load'
    from /Users/pat/.rvm/gems/ruby-1.9.2-p0/bin/sass-convert:19:in `<main>'

chriseppstein commented Jul 5, 2011

I'm not sure how much value this adds anymore given that most people are using less.js which has many syntax differences from the ruby version.

agreed, i was simply going to use it once to merge some stuff back to sass, ended up doing it by hand.

Haegin commented Jul 29, 2011

I've got the same problems - Is there any plan to support the ruby less stuff still?

Looks like the latest version of less.rb is just wrappers for the less.js.

Gemspec requires V8, which is loaded and used to exec less.js.

Mite be an idea to include some sort of deprecation warning so others don't get lead on a goose chase like I was :)

elfassy commented Oct 11, 2011


smt commented Oct 26, 2011


sass 3.1.10 && less 2.0.7

slbug commented Dec 3, 2011

samw thing with sass 3.1.11 && less 2.0.8

andyfitz commented Jan 9, 2012


varley commented Jan 10, 2012

same deal with sass 3.1.12 and less 2.0.8. I was excited enough about to try a number of combinations of earlier point releases from both libs, but same result. dashed hopes (for an easy conversion path)


chriseppstein commented Jan 10, 2012

Less.rb is old and deprecated, it doesn't support the current less syntax. A less to sass converter is a good thing to have, but a rewrite of this feature is required to achieve that.

@nex3, I'm going to remove the less support from sass-convert unless you object. I think a less to sass converter can and should be provided by a separate project -- maybe it would be built on less.js's internals instead of sass's.


nex3 commented Jan 10, 2012

@chriseppstein No objections here. Probably want to have "--from less" etc print an error through 3.2, though.

Maybe the best way to have "--from less" working in future is to use less.js to parse the file, then dump it to JSON and load it into Sass? It seems easier than rewriting sass/tree in Javascript.


chriseppstein commented Jan 10, 2012

It's an interesting approach also.

MSch commented Jun 7, 2012

So is there any way to semi-automatically convert less->scss right now?


nex3 commented Jun 15, 2012

@MSch Not currently, no.


chriseppstein commented Jul 17, 2012

It's a simple fix, let's get this into 3.2.


nex3 commented Jul 20, 2012

@chriseppstein You mean having "--from less" print an error?


chriseppstein commented Jul 20, 2012


nex3 closed this in 0db3cb6 Jul 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment