Great - thanks for your reply!

-Roop

On Aug 19, 10:23 pm, Pat Allan <[email protected]> wrote:
> Hi Roop
>
> Thanks for that - I think someone else has pointed out the same flaw. I'll 
> try to get a patch in shortly. And yes, your approach is fine.
>
> Cheers
>
> --
> Pat
>
> On 20/08/2010, at 8:51 AM, roop wrote:
>
>
>
> > Hello,
>
> > I've used TS a bit with Rails 2.3 and the experience was very smooth
> > -- thanks for all your hard work on this.
>
> > Currently I am exploring Sphinx/ThinkingSphinx as a replacement for
> > Ferret/acts_as_ferret on a Rails 2.0.2 application.  I've seen
> > elsewhere in this forum that TS *ought* to work with Rails 2.0.x, but
> > for me trying to build the indexes resulted in the following error:
>
> >> rake aborted!
> >> undefined method `configuration' for Rails:Module
> >> /opt/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/thinking_sphin
> >>  x/tasks.rb:7
> >> [...]
>
> > The offending line of code at tasks.rb:7 is:
>
> >    Rails.configuration.cache_classes = false
>
> > The method Rails#configuration was only introduced in 2.1, I believe,
> > so this call fails under Rails 2.0.x. I replaced the above line with
> > this:
>
> >    if defined?(Rails.configuration)
> >            Rails.configuration.cache_classes = false
> >    else
> >            Rails::Initializer.run do |config|
> >                    config.cache_classes = false
> >            end
> >    end
>
> > And that seemed to make indexing and searching work fine.
>
> > However, I wanted to see if this was an appropriate solution. I don't
> > know Rails or TS internals so well, so I want to be sure I'm not doing
> > something crazy here.
>
> > I'd appreciate any thoughts.
>
> > Thanks,
> > Roop
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Thinking Sphinx" 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 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" 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/thinking-sphinx?hl=en.

Reply via email to