redhill core conflict?

1 view
Skip to first unread message

decostop

unread,
Jul 23, 2008, 4:51:11 PM7/23/08
to Thinking Sphinx
I just started playing with thinking sphinx because I am interested in
switching a current application from ferret to sphinx and quickly ran
into an issue. With index statements in one of the models to do some
initial experimentation I run the ts:in rake task and get the
following;
rake aborted!
undefined method `columns' for #<ThinkingSphinx::Index:0x393a4c4>
/Users/kblaisdell/gitrepos/intoproductions/trunk/vendor/plugins/
redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb:
28:in `columns'
/Users/kblaisdell/gitrepos/intoproductions/trunk/vendor/plugins/
redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb:
27:in `each'
/Users/kblaisdell/gitrepos/intoproductions/trunk/vendor/plugins/
redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb:
27:in `columns'
/Users/kblaisdell/gitrepos/intoproductions/trunk/vendor/plugins/
thinking-sphinx/lib/thinking_sphinx/attribute.rb:215:in `all_ints?'
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:1602:in `all?'
/Users/kblaisdell/gitrepos/intoproductions/trunk/vendor/plugins/
thinking-sphinx/lib/thinking_sphinx/at

Looks like there is some type of conflict with the redhill plugin we
have installed and I am starting to look into it. Perhaps someone
else is successfully using the 2 together already or has some tips?

Thanks

Joe Noon

unread,
Jul 23, 2008, 8:39:03 PM7/23/08
to thinkin...@googlegroups.com
On Wed, Jul 23, 2008 at 1:51 PM, decostop <blais...@gmail.com> wrote:
Looks like there is some type of conflict with the redhill plugin we
have installed and I am starting to look into it.  Perhaps someone
else is successfully using the 2 together already or has some tips?

I actually ran into this last week.  redhillonrails_core does a bunch of stuff, one of the things being defining an #indexes method on each model.  This definitely conflicts with TS.  Luckily I had already stopped using the other redhill plugins that depend on core a while ago, so was just able to remove it all together.  Now the only two I'm using are restful_transactions and transactional_migrations, neither of which depend on core.

Opinions may vary, but I'm much more sure my app is working as expected without the auto-validations and auto-associations I was previously using some of the redhill plugins for.  It just seems like a bit too much and not exactly the way I would do it.  But the other plugins seem great.

Now I just have to write out my more complicated CREATE INDEX's and foreign keys by hand in migrations, but thats not a huge deal.

Joe
 

decostop

unread,
Jul 24, 2008, 11:59:48 AM7/24/08
to Thinking Sphinx
Thanks. I found the same thing with the indexes method being a
problem, but hadn't posted back because I didn't really come to a
solution yet. For the time being I just made a comment in the redhill
code to disable some stuff which I am sure breaks it, but lets me
continue with TS. It brings me to a larger issue which is really out
of scope for this forum about why the community doesn't see this type
of method naming collision issue as a greater problem. It seems to
mostly be written off as something that doesn't need to be dealt with
or is a corner case because the community is small. But the community
really isn't all that small anymore and with a rails and it's plugin
system and rapidly growing stable of plugins it seems to me like this
will continue to be a fairly common issue. After all I have run into
it twice in the last couple of months with fairly logical scenarios (1
- a db and search plugin both want to use indexes, 2 - Something
involving "options").

Anyway the redhill code is something that was added by someone else
awhile back so I don't know yet what it is going to mean if I want to
pull it out, but I do like that it (I believe) creates some of the
constraints and indexes for relationships without me having to do it.
Right now I think I will either end up redefining the redhill indexes
method as something like rh_indexes or possibly removing it all
together since I don't have a better solution and I suspect if we keep
both we would be much more likely to regularly be updating TS code to
latest versions than the redhill code.

On Jul 23, 5:39 pm, "Joe Noon" <joen...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages