I’m seeing the following when trying to re-build Discourse with the voting plugin:
NameError: uninitialized constant SiteCategorySerializer
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:283:in `const_get'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:283:in `block in constantize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:281:in `inject'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:281:in `constantize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
/var/www/discourse/lib/plugin/instance.rb:93:in `block in add_to_serializer'
/var/www/discourse/lib/plugin/instance.rb:699:in `reloadable_patch'
/var/www/discourse/lib/plugin/instance.rb:92:in `add_to_serializer'
/var/www/discourse/plugins/discourse-voting/plugin.rb:82:in `block (2 levels) in activate!'
/var/www/discourse/plugins/discourse-voting/plugin.rb:81:in `each'
/var/www/discourse/plugins/discourse-voting/plugin.rb:81:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:328:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:326:in `each'
/var/www/discourse/lib/plugin/instance.rb:326:in `notify_after_initialize'
/var/www/discourse/config/application.rb:292:in `each'
/var/www/discourse/config/application.rb:292:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
Seems related to some recent refactoring in the plugin:
- https://github.com/discourse/discourse-voting/commit/020ed3cd6d19d6bca92b7273ac6cdde2ac5eefe4#diff-b61ae67bc6a57a3decb8d15b832077f4
- https://github.com/discourse/discourse-voting/commit/7e6f27b198416a6ef27f0f0df715f5e6cfc00197#diff-b61ae67bc6a57a3decb8d15b832077f4
The last known “good” version I have tried with is the following:
I’m running Discourse version 2.3.2.