metaskills / less-rails

:-1: :train: Less.js For Rails
http://github.com/metaskills/less-rails
MIT License
340 stars 133 forks source link

Doesn't work with sprockets 4 beta #135

Open ncri opened 7 years ago

ncri commented 7 years ago

I get

.rvm/gems/ruby-2.3.0/bundler/gems/less-rails-6beb59048f51/lib/less/rails/railtie.rb:15:in `block in <class:Railtie>': uninitialized constant Sprockets::Engines (NameError)
    from .rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:41:in `execute_hook'
    from .rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
    from .rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:49:in `each'
    from .rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/application/bootstrap.rb:78:in `block in <module:Bootstrap>'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `instance_exec'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `run'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
    from .rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:54:in `run_initializers'
    from .rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/application.rb:352:in `initialize!'
brendon commented 7 years ago

Can you try my fork and see if it fixes your problem? https://github.com/brendon/less-rails/tree/fix-sprockets-loading

PlugIN73 commented 7 years ago

Hi! I have the same issue. @brendon I just checked your branch - it works.

brendon commented 7 years ago

Great to hear @PlugIN73 :) I'm having trouble getting the test suite to run with 4 beta but I think it's more about the manifest.js file not being read in order for the tests to find the assets. I've opened an issue here: https://github.com/rails/sprockets/issues/484