Hi,
first of all, this is a copy of my post into official algolia-discourse. As told by Discourse-Support, I can now post it here, therefore this is a copy-message.
I would like to setup our discourse with algolia, but it is not working like described on GitHub. I have newest version: 3.1.0.beta1.
To make first init, I open my discourse-docker with
./launcher enter app
After that, I tried different commands (bundle exec rails or only rails, also rake), but all results into:
root@rbx-communtity-service-app:/var/www/discourse# LOAD_PLUGINS=1 rails algolia:initialize
rails aborted!
Donât know how to build task âalgolia:initializeâ (See the list of available tasks withrails --tasks
)
Did you mean? algolia:reindex
When I run just algolia:reindex, i get the following:
root@rbx-communtity-service-app:/var/www/discourse# LOAD_PLUGINS=1 rake algolia:reindex
Clearing users from Algolia
Pushing users to Algolia
..
Successfully pushed xxx users to Algolia
Clearing tags from Algolia
Pushing tags to Algolia
..
Successfully pushed xxx tags to Algolia
Clearing posts from Algolia
Pushing posts to Algolia
rake aborted!
NoMethodError: undefined method `id' for nil:NilClass
/var/www/discourse/plugins/discourse-algolia/lib/discourse_algolia/post_indexer.rb:66:in `to_object'
/var/www/discourse/plugins/discourse-algolia/lib/discourse_algolia/indexer.rb:23:in `block in process!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:71:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:71:in `block in find_each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:138:in `block in find_in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:245:in `block in in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:229:in `loop'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:229:in `in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:137:in `find_in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:70:in `find_each'
/var/www/discourse/plugins/discourse-algolia/lib/discourse_algolia/indexer.rb:21:in `process!'
/var/www/discourse/plugins/discourse-algolia/lib/tasks/discourse_algolia.rake:36:in `block in algolia_reindex'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:245:in `block in in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:229:in `loop'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/relation/batches.rb:229:in `in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/querying.rb:22:in `in_batches'
/var/www/discourse/plugins/discourse-algolia/lib/tasks/discourse_algolia.rake:33:in `algolia_reindex'
/var/www/discourse/plugins/discourse-algolia/lib/tasks/discourse_algolia.rake:7:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli/exec.rb:58:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli/exec.rb:58:in `kernel_load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli/exec.rb:23:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:491:in `exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:34:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/cli.rb:28:in `start'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/exe/bundle:45:in `block in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bundler-2.4.1/exe/bundle:33:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => algolia:reindex
(See full trace by running task with --trace)
Any idea whats the issue here?
Thanks in advance!
M.Anderson