Faulty config generator?

7 views
Skip to first unread message

Claudio Poli

unread,
Aug 28, 2008, 10:31:40 PM8/28/08
to Thinking Sphinx
hi there,
I usually keep up to date my thinking sphinx via github installed as a
plugin.

Today I noticed that when running the configure rake tasks all I have
generated is this:

# development.sphinx.conf

indexer
{
mem_limit = 64M
}

searchd
{
address = 127.0.0.1
port = 3312
log = /Users/kain/Sites/mysite/log/searchd.log
query_log = /Users/kain/Sites/mysite/log/searchd.query.log
read_timeout = 5
max_children = 30
pid_file = /Users/kain/Sites/mysite/log/searchd.development.pid
max_matches = 1000
}

and nothing else. I've no custom yml config files floating around.

Of course I have my define_index in interested models, any ideas what
could be wrong?

thanks.

Michael Irwin

unread,
Aug 28, 2008, 10:35:59 PM8/28/08
to Thinking Sphinx
I'm seeing something similar, but only one of my models is getting
indexed.

Michael Irwin

unread,
Aug 28, 2008, 10:52:53 PM8/28/08
to Thinking Sphinx
BTW, I'm using Edge Rails, TS installed as a plugin and kept up-to-
date with GitHub.

Claudio Poli

unread,
Aug 28, 2008, 11:09:32 PM8/28/08
to Thinking Sphinx
as I suspected this have something to do in the way models are loaded
(this is a recent change).

models are getting correctly loaded and picked up by the configurator
if config.cache_classes = true, this is the default behaviour in
production environment, but not development.

DrMark

unread,
Aug 29, 2008, 12:26:48 AM8/29/08
to Thinking Sphinx
Aloha all,

I am also running edge Rails and Thinking Sphinx installed as a
plugin. I noticed that adding it to the rake task fixes the problem,
as does adding the load_model call back to the code. If only I had
some extra time to help troubleshoot :(

Pat Allan

unread,
Aug 29, 2008, 6:13:26 AM8/29/08
to thinkin...@googlegroups.com
Just added the call back, until we figure out the differences in why
it works sometimes and not others.

Sorry causing the problem :|

--
Pat

Drew

unread,
Sep 12, 2008, 12:08:58 PM9/12/08
to Thinking Sphinx
Ironically, I'm having the opposite problem:

Anytime I run ts:config or ts:index in production, it doesn't pick up
any of the models with define_index. If I set cache_classes to false
for production, it will work just fine.

An even bigger problem is that when in production I get exceptions
"Expected xxxx to define: xxxx" errors. Removing the thinking_sphinx
plugin and these go away. I suspect it has to do with the model
loading that is done, but I can't find any way to fix the problem.

Drew

On Aug 29, 4:13 am, Pat Allan <p...@freelancing-gods.com> wrote:
> Just added the call back, until we figure out the differences in why  
> it works sometimes and not others.
>
> Sorry causing the problem :|
>
> --
> Pat
>
> On 29/08/2008, at 5:26 AM, DrMark wrote:
>
>
>
> > Aloha all,
>
> > I am also running edge Rails and Thinking Sphinx installed as a
> > plugin. I noticed that adding it to the rake task fixes the problem,
> > as does adding the load_model call back to the code. If only I had
> > some extra time to help troubleshoot :(
>
> > On Aug 28, 5:09 pm, Claudio Poli <masterk...@gmail.com> wrote:
> >> as I suspected this have something to do in the way models are loaded
> >> (this is a recent change).
>
> >> models are getting correctly loaded and picked up by the configurator
> >> if config.cache_classes= true, this is the default behaviour in

Sean Cribbs

unread,
Sep 12, 2008, 1:19:51 PM9/12/08
to thinkin...@googlegroups.com
I ran into this problem with one of my projects this week.  As it turns out, I was doing some meta-magic in files in my lib/ directory and loading them with an config/initializers file; typical "acts_as" stuff.  When I put them in an internal plugin instead and adjusted my environment.rb, the TS problems went away. e.g.

config.plugins = [:internal, :all]

As I've come to find working on a lot of Rails projects, load-order is often the root cause of problems like these.  See if you're doing anything like that and adjust your plugin load-order accordingly.

Sean
Reply all
Reply to author
Forward
0 new messages