kpumuk / sphinx

An easy interface to Sphinx standalone full-text search engine. It is implemented as plugin for Ruby on Rails, but can be easily used as standalone library.
http://kpumuk.info/projects/ror-plugins/sphinx
27 stars 4 forks source link

default setup errors #3

Open danielb2 opened 11 years ago

danielb2 commented 11 years ago

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>'
dlarchikov commented 10 years ago

I have the same problem. There is a solution?

danielb2 commented 10 years ago

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

dlarchikov commented 10 years ago

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

dayusor commented 10 years ago

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.

dlarchikov commented 10 years ago

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