sphinx
sphinx copied to clipboard
default setup errors
I'm using sphinx 2.0.7 on osx
I have some trouble getting the gem to work. Here are the steps I've done:
- use the default distribution
sphinx.conf.dist
as the conf file for sphinx -
mysql -utest test < example.sql
- run
indexer --all
- execute the sample code from the README.md
require 'logger';Sphinx::Client.new(Logger.new(STDOUT)).query('test')
/Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:98:in `block in initialize': uninitialized constant Sphinx::Client::VERSION (NameError)
What am I doing wrong?
Also, if I remove the Logger, and just execute Sphinx::Client.new.query('test')
I get the error below
[~/work]$ ./matching.rb
/Users/daniel/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:143:in `select': can't convert FalseClass into time interval (TypeError)
from /Users/daniel/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:143:in `rescue in rbuf_fill'
from /Users/daniel/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
from /Users/daniel/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:92:in `read'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2368:in `parse_response'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2338:in `block (2 levels) in perform_request'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2537:in `block in with_socket'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/timeout.rb:27:in `safe_execute'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2536:in `with_socket'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2327:in `block in perform_request'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2462:in `with_server'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:2320:in `perform_request'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:1725:in `run_queries'
from /Users/daniel/.rvm/gems/ruby-1.9.3-p327/gems/sphinx-2.1.1.3712/lib/sphinx/client.rb:1472:in `query'
from ./matching.rb:13:in `<main>'
I have the same problem. There is a solution?
@dimka3210 I don't think I ever got this working. I know I ended up using https://github.com/pat/thinking-sphinx
I did. Now it works. Took a client in the archive with the source. Put it in the vendors/plugins/sphinx and all
The problem is still happening to me (`select': can't convert FalseClass into time interval), is there a known fix, I'm trying to get this working on irb (not rails).
Thanks in advance.
Works only with the coding cp1251, utf8 is not working.