Closed virtualmice closed 11 years ago
STI certainly can cause problems... though I'd be expecting something else is going wrong somewhere. What's in your dummy.rake file? I wonder if that's doing something before the Rails environment is fully loaded?
The dummy.rake (28) ist just require-ing the incriminated STI Question model
require File.join( File.dirname(__FILE__), '../..', 'app', 'models', 'question' )
What happens if you comment that line out? Why not let Rails load things the way it expects?
Anyway STI seems to me a bad coding practice. It's just that many existing projects happen to use it.
Can't test it right now, I discarded the branch.
I think the require was already a desperate attempt at making it work.
Okay... well, if that require wasn't helping, am curious what the stack trace is now...
Well, sorry about that, deadline imposed postponing TS integration. I'll sure let you know as soon as as give it another try.
I wonder how many people are currently using Rails 3.2.2 with TS and other popular gems. I've had problems with acts_as_taggable_on too.
At this point I don't know if it's me being clumsy or if there is some real gem breakage with 3.2.2 :-/
No worries. If you get another chance to look into it, let me know.
On 27/07/2012, at 17:50, Philippe Lachaise reply@reply.github.com wrote:
Well, sorry about that, deadline imposed postponing TS integration. I'll sure let you know as soon as as give it another try.
Reply to this email directly or view it on GitHub: https://github.com/freelancing-god/thinking-sphinx/issues/369#issuecomment-7308788
Hello, I'm having the same issue but with Padrino 0.10.7
and thinking-sphinx 2.0.13
without Rails.
I have this in my Gemfile:
gem 'thinking-sphinx', '~> 2.0.13'
And simply trying to start the app with config.ru
I get the error:
`method_missing': undefined method `define_index' for #Class...
Is there anything else needed to use thinking sphinx with Padrino and no Rails?
Thanks.
PS Maybe I should open a new issue with the proper title Padrino so as not to confuse this one?
Hi,
I'm stuck with a elusive problem and I have Goggled in vain for a usable piece of knowlege regarding it :
On top of my Gemfile is :
N.B. I tried with AND without ":require => 'thinking_sphinx' "
define_index is only invoked in one sigle model :
Failure occurs in TWO distinct contexts, rake AND in the app :
In the app a stange bug occur : STI overrides of some methods seem to disapear ?!
Actually, it veru much looks as if TS was figthting with STI. Is that possible ?
Trying to wrap my index definition in a module and inject it in child classes produces a STI-related error :
Is a conflict over a 'type' attribute or method a possibility ?
Thanks for any hint at some solution, I'm pretty stuck.