sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

default setup errors

Open danielb2 opened this issue 11 years ago • 5 comments

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:

  1. use the default distribution sphinx.conf.dist as the conf file for sphinx
  2. mysql -utest test < example.sql
  3. run indexer --all
  4. 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>'

danielb2 avatar Jun 04 '13 21:06 danielb2

I have the same problem. There is a solution?

dlarchikov avatar Feb 01 '14 08:02 dlarchikov

@dimka3210 I don't think I ever got this working. I know I ended up using https://github.com/pat/thinking-sphinx

danielb2 avatar Feb 03 '14 17:02 danielb2

I did. Now it works. Took a client in the archive with the source. Put it in the vendors/plugins/sphinx and all

dlarchikov avatar Feb 10 '14 07:02 dlarchikov

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.

dayusor avatar Jun 26 '14 12:06 dayusor

Works only with the coding cp1251, utf8 is not working.

dlarchikov avatar Jul 23 '14 07:07 dlarchikov