Yes. TS worked fine with JRuby. This problem started when I renamed all
database tables and columns (my project leader imposes some conventions in
database table and column names which is not compatible with Rails
conventions). So, to workaround this, I've created views to wrap all
database column following Rails conventions. When I comment the define_index
method from my model class, this error disapear.

On Wed, Dec 15, 2010 at 2:45 AM, Pat Allan <[email protected]> wrote:

> Possibly... although that error's related to the database connection
> object. Are you using any other libraries that may influence the database
> collection? As far as I know, TS should play nicely with JRuby, but I don't
> test against it - so that could be an influence as well.
>
> --
> Pat
>
> On 15/12/2010, at 3:29 PM, Gustavo de Sá Carvalho Honorato wrote:
>
> > On Wed, Dec 15, 2010 at 2:15 AM, Pat Allan <[email protected]>
> wrote:
> >> Hi Gustavo
> >>
> >> To be honest, I'm not sure... that depends on how views behave. Are you
> building your models upon views?
> >
> > Yes. I'm wrapping all database tables with views and then using the
> > views in models. When I save a model object in database, I'm getting
> > the following weird error. I suspect that it is because this model is
> > backed on views. What do you think?
> >
> > ypeError (can't clone NilClass):
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/source.rb:23:in
> > `clone'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/source.rb:23:in
> > `initialize'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:258:in
> > `new'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:258:in
> > `source'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:104:in
> > `indexes'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:103:in
> > `each'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:103:in
> > `indexes'
> >  app/models/event.rb:76
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:37:in
> > `instance_eval'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:37:in
> > `initialize'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:27:in
> > `new'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/index/builder.rb:27:in
> > `generate'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:190:in
> > `add_sphinx_index'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:157:in
> > `define_index'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:172:in
> > `call'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:172:in
> > `define_indexes'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:171:in
> > `each'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:171:in
> > `define_indexes'
> >
>  
> /home/gustavo/.rvm/gems/jruby-1.5.2/gems/thinking-sphinx-1.3.20/lib/thinking_sphinx/active_record.rb:381:in
> > `define_indexes'
> >  app/controllers/events_controller.rb:65:in `create'
> >  app/controllers/events_controller.rb:64:in `create'
> >
>  
> /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/httpserver.rb:104:in
> > `service'
> >
>  
> /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/httpserver.rb:65:in
> > `run'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:173:in
> > `start_thread'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:162:in
> > `start'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:162:in
> > `start_thread'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:95:in
> > `start'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:92:in
> > `each'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:92:in
> > `start'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:23:in
> > `start'
> >
>  /home/gustavo/.rvm/rubies/jruby-1.5.2/lib/ruby/1.8/webrick/server.rb:82:in
> > `start'
> >  -e:1
> >
> >>
> >> In short - it's not tested, but perhaps it will work.
> >>
> >> --
> >> Pat
> >>
> >> On 15/12/2010, at 3:14 PM, Gustavo de Sá Carvalho Honorato wrote:
> >>
> >>> Hi,
> >>>
> >>> can thinking_sphinx index database views?
> >>>
> >>> Thanks in advance,
> >>> Gustavo Honorato
> >>>
> >>> --
> >>> 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]<thinking-sphinx%[email protected]>
> .
> >>> For more options, visit this group at
> http://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]<thinking-sphinx%[email protected]>
> .
> >> For more options, visit this group at
> http://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]<thinking-sphinx%[email protected]>
> .
> > For more options, visit this group at
> http://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]<thinking-sphinx%[email protected]>
> .
> For more options, visit this group at
> http://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