Hello,
I followed instructions for "Merb, DataMapper and IsSearchable" from
dm-sphinx-adapter readme, but I couldn't get it work. I have sphinx
working, but in merb console I get this error:

s...@opensuse:~/workspace/mpk_merb> sudo /usr/local/bin/searchd
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file './sphinx.conf'...
creating server socket on 0.0.0.0:3312
s...@opensuse:~/workspace/mpk_merb> ./bin/merb -i
Loading init file from /home/suse/workspace/mpk_merb/config/init.rb
Loading /home/suse/workspace/mpk_merb/config/environments/
development.rb
Logging to file at /home/suse/workspace/mpk_merb/log/
development.log
irb: warn: can't alias context from
irb_context.
irb(main):001:0> Stop.search(:name =>
'test')
NoMethodError: undefined method `call' for
nil:NilClass
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/property.rb:305:in `field'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/query.rb:35:in `initialize'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/query.rb:31:in `each'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/query.rb:31:in `initialize'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/adapter.rb:118:in `new'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/adapter.rb:118:in `read'
        from /usr/lib64/ruby/gems/1.8/gems/dm-sphinx-adapter-0.6/lib/
dm-sphinx-adapter/adapter.rb:66:in `read_many'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/repository.rb:61:in `read_many'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/model.rb:253:in `all'
        from /usr/lib64/ruby/gems/1.8/gems/dm-is-searchable-0.9.8/lib/
dm-is-searchable/is/searchable.rb:31:in `search'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/model.rb:113:in `repository'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core.rb:181:in `repository'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/repository.rb:44:in `scope'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core.rb:181:in `repository'
        from /home/suse/workspace/mpk_merb/gems/gems/dm-core-0.9.8/lib/
dm-core/model.rb:113:in `repository'
        from /usr/lib64/ruby/gems/1.8/gems/dm-is-searchable-0.9.8/lib/
dm-is-searchable/is/searchable.rb:31:in `search'
        from (irb):1
        from :0irb(main):002:0>

Please tell me what I might be doing wrong. I use dm 0.9.8. This is
how sphinx works:

s...@opensuse:~/workspace/mpk_merb> /usr/local/bin/search test
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file './sphinx.conf'...
index 'stops': query 'test ': returned 1 matches of 1 total in 0.000
sec

displaying matches:
1. document=402, weight=1
        id=402
        name=test
        lon=(null)
        lat=(null)
        location=street
        updated_at=2009-02-19 13:22:27

words:
1. 'test': 1 documents, 1 hits

Stan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to