uninitialized constant ThinkingSphinx::Index::Builder::ThinkingSphinx

35 views
Skip to first unread message

Christoffer Klang

unread,
Oct 19, 2011, 2:57:28 AM10/19/11
to thinkin...@googlegroups.com
Hi all,

I just recently upgraded an app from 3.0.7 to 3.1.1 and keep running into this error whenever I call the search method:

uninitialized constant ThinkingSphinx::Index::Builder::ThinkingSphinx

My Google-fu fails me. There's also zero matches for "ThinkingSphinx::Index::Builder::ThinkingSphinx", so I'm thinking this is not a general error.

The stack trace from thinking sphinx is:

thinking-sphinx (2.0.9) lib/thinking_sphinx/index/builder.rb:19:in `generate'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:203:in `add_sphinx_index'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:170:in `block in define_index'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:185:in `call'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:185:in `block in define_indexes'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:184:in `each'
thinking-sphinx (2.0.9) lib/thinking_sphinx/active_record.rb:184:in `define_indexes'
thinking-sphinx (2.0.9) lib/thinking_sphinx/context.rb:21:in `block in define_indexes'
thinking-sphinx (2.0.9) lib/thinking_sphinx/context.rb:20:in `each'
thinking-sphinx (2.0.9) lib/thinking_sphinx/context.rb:20:in `define_indexes'
thinking-sphinx (2.0.9) lib/thinking_sphinx/search.rb:87:in `initialize'
thinking-sphinx (2.0.9) lib/thinking_sphinx/search_methods.rb:368:in `new'
thinking-sphinx (2.0.9) lib/thinking_sphinx/search_methods.rb:368:in `search'
app/controllers/api/books_controller.rb:8:in `index' <- this line invokes "Book.search(query)"

In my model, I have the index defined as such:

class Book
  has_many :editions
  define_index do
    indexes editions.title
    indexes editions.isbn
    indexes editions.author(:name), :as => :author
  end
end

If it's any help; the error also occur when running the specs.

I'm on Rails 3.1.1, with TS 2.0.9 on top of Sphinx 0.9.9-release (r2117).

Any help at all would be greatly appreciated.

Thanks,
/Christoffer

Pat Allan

unread,
Oct 24, 2011, 2:04:34 AM10/24/11
to thinkin...@googlegroups.com
Hi Christoffer

I've not seen this issue before, and it's odd as to why it'd be happening - just to confirm, you've only got TS installed as a gem, not as a plugin as well?

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/nTS170497L4J.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Reply all
Reply to author
Forward
0 new messages