pat / thinking-sphinx

Sphinx/Manticore plugin for ActiveRecord/Rails
http://freelancing-gods.com/thinking-sphinx
MIT License
1.63k stars 468 forks source link

Riddle::Configuration::ConfigurationError #1190

Closed Azzawie closed 3 years ago

Azzawie commented 3 years ago

Hello @pat I installed sphinx and after trying to run the ts:configurefor the first time I received this error

  rake ts:configure --trace

  ** Invoke ts:configure (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  /Users/projects/config/initializers/parameter_filter.rb:4: warning: already initialized constant ActionDispatch::Http::ParameterFilter::FILTERED
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/http/parameter_filter.rb:4: warning: previous definition of FILTERED was here
  ** Execute ts:configure
  Generating configuration to config/development.sphinx.conf
  rake aborted!
  Riddle::Configuration::ConfigurationError: inventory_adjustment_core [] /Users/projects/management_portal/db/sphinx/development/inventory_adjustment_core 
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/riddle-2.3.1/lib/riddle/configuration/index.rb:26:in `render'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/core/index.rb:71:in `render'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/riddle-2.3.1/lib/riddle/configuration.rb:45:in `block in render'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/riddle-2.3.1/lib/riddle/configuration.rb:45:in `collect'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/riddle-2.3.1/lib/riddle/configuration.rb:45:in `render'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/configuration.rb:104:in `render'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/configuration.rb:110:in `block in render_to_file'
  /Users/.rbenv/versions/2.3.4/lib/ruby/2.3.0/open-uri.rb:37:in `open'
  /Users/.rbenv/versions/2.3.4/lib/ruby/2.3.0/open-uri.rb:37:in `open'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/configuration.rb:110:in `render_to_file'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/commands/configure.rb:7:in `call'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/commands/base.rb:11:in `call_with_handling'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/commands/base.rb:7:in `call'
  /Users/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/commander.rb:7:in `call'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/rake_interface.rb:12:in `configure'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/thinking-sphinx-4.0.0/lib/thinking_sphinx/tasks.rb:6:in `block (2 levels) in <top (required)>'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/airbrake-11.0.1/lib/airbrake/rake.rb:19:in `execute'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
  /Users/./.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
  /Users/./.rbenv/versions/2.3.4/bin/rake:23:in `load'
  /Users/.rbenv/versions/2.3.4/bin/rake:23:in `<main>'
  Tasks: TOP => ts:configure
pat commented 3 years ago

Seems like there's a couple of issues here…

Regarding the configuration issue - can you share the index definition for your InventoryAdjustment model?

And as for the daemon not starting - it seems there's already a Sphinx process running. You should be able to find it via ps aux | grep searchd. Plus, you're using Sphinx 3.3.1, which requires Thinking Sphinx v5.1.0 (the latest release) - it looks like you're on v4.0.0.

Azzawie commented 3 years ago

Which version of sphinx should I use with Thinking Sphinx 4.0.0 and how I can specify the version of sphinx when doing the installation.

Azzawie commented 3 years ago

I switched to 2.2.11 and it's working now,

searchd
Sphinx 2.2.11-id64-release (95ae9a6)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/Cellar/sphinx/2.2.11_3/etc/sphinx.conf'...

Thanks @pat