zweilove / css_splitter

Gem for splitting up stylesheets that go beyond the IE limit of 4095 selectors, for Rails 3.1+ apps using the Asset Pipeline.
MIT License
160 stars 47 forks source link

NoMethodError: undefined method `register_bundle_processor' for nil:NilClass #60

Closed dalezak closed 8 years ago

dalezak commented 8 years ago

I just started getting this error, is it related to css_splitter 0.4.3?

remote:        NoMethodError: undefined method `register_bundle_processor' for nil:NilClass
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/css_splitter-0.4.3/lib/css_splitter/engine.rb:6:in `block in <class:Engine>'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/config/environment.rb:3:in `<top (required)>'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
remote:        /tmp/build_1ee475aa8cb98aff4e21dd27f839a10f/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
edslocomb commented 8 years ago

Same issue here; rails 4.2.5, ruby 2.2.2, bundler 1.10.6

Edit: and sprockets 3.5.2

Edit 2: sprockets-rails 3.0.0 -- and holding sprockets-rails below 3.x seems to fix the problem.

sgringwe commented 8 years ago

I am also receiving this error after upgrading an existing project to rails 5. Do you plan to support rails 5?

scriptfans commented 8 years ago

Same issue, please help me resolve it, thanks.

jhilden commented 8 years ago

I could imagine that this issue is caused by the recent release of sprockets-rails version 3.0 https://rubygems.org/gems/sprockets-rails/versions/3.0.0 From the release date it seems to match with this issue.

So a quickfix could possibly be to downgrade sprockets-rails

This gem is sort of in "limited maintenance" mode, since we do not actively use it in any projects anymore. But any investigation and/or pull requests will be greatly appreciated.

sgringwe commented 8 years ago

@jhilden sprocket-rails is upgraded alongside rails 5. Does rails 5 support count as 'limited maintenance'? I will see what I can do to help. May I ask what alternative you are using if you aren't using this in projects anymore?

jhilden commented 8 years ago

I'm sorry, but it is unlikely that I personally will have time to work on Rails 5 support anytime soon. I'm afraid "limited maintenance" currently only means reviewing code, trying to help and merging PRs.

I'm looking forward to your help/PR.

May I ask what alternative you are using if you aren't using this in projects anymore?

We are just lucky enough that we currently don't have any large projects where the support for IE9 and below is very crucial.

jhilden commented 8 years ago

I just released version 0.4.4 with the fix #60 by @seckenrode

Please let us know if this fixes all your issues.

sgringwe commented 8 years ago

:+1: thank you!