При попытке пересобрать Discourse с плагином голосования я вижу следующее:
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'
Похоже, это связано с недавним рефакторингом в плагине:
- FIX: wraps overrides in reloadable_patch · discourse/discourse-topic-voting@020ed3c · GitHub
- FIX: Add can_vote attribute to all category serializers. (#43) · discourse/discourse-topic-voting@7e6f27b · GitHub
Последняя известная «рабочая» версия, которую я пробовал, следующая:
Я использую версию Discourse 2.3.2.