view_component-contrib
view_component-contrib copied to clipboard
Compiling assets raises an error
What did you do?
#20 [stage-1 11/11] RUN RAILS_ENV=staging bundle exec rake assets:precompile
What did you expect to happen?
Generated assets
What actually happened?
#20 6.164 NoMethodError: undefined method `autoloaders' for Rails:Module
#20 6.164 Did you mean? autoloads
#20 6.164 autoload
#20 6.164 autoload?
#20 6.164 autoload_at
#20 6.165 /usr/local/bundle/gems/view_component-contrib-0.1.4/lib/view_component_contrib/railtie.rb:12:in `block in <class:Railtie>'
Additional context
Environment
Ruby Version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]
Framework Version (Rails, whatever): Rails 5.2.8.1
View Component Contrib Version: view_component (3.2.0) view_component-contrib (0.1.4)
Hey!
Sorry for late response.
We never tested against Rails 5. Though, I see that ViewComponent still supports 5.2. Let me check if there is a quick fix (in the worst case we can disable some features for now).
I opened a PR here to check if we can add Rails 5 support: #37
The above issue is fixed but some tests still fail. I'm not going to dig into it anytime soon but if you give this branch a try and provide your feedback—I would appreciate it.