Heya James Not sure why it's hitting the code that's causing the error - but I think I've got that fixed in edge - give the rails3 branch a try.
Cheers -- Pat On 11/09/2011, at 12:56 AM, James Healy wrote: > Hi Pat, > > Are there any known issues with thinking-sphinx and rails 3.1? I'm > having trouble generating the TS config file in the rails 3.1 branch > of one of my apps. > > My environment is ruby 1.9.2, rails 3.1, TS 3.0.7 and sphinx 0.9.9. > > My app has a single indexed model with a TS block like so: > > class Approval < ActiveRecord::Base > .. > define_index do > indexes :id, :as => :id_str > indexes customer.key, :as => :customer_code > set_property :delta => :delayed > end > .. > end > > When I attempt to generate a config file I get an exception: > > ⚡ be rake ts:config --trace > ** Invoke ts:config (first_time) > ** Invoke thinking_sphinx:configure (first_time) > ** Invoke thinking_sphinx:app_env (first_time) > ** Execute thinking_sphinx:app_env > ** Execute thinking_sphinx:configure > Generating Configuration to > /home/jh/git/rba-wole/config/development.sphinx.conf > rake aborted! > undefined method `relation' for > #<ActiveRecord::Associations::JoinDependency::JoinAssociation:0x0000000ad68710> > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/attribute.rb:240:in > `block in query' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/attribute.rb:239:in > `each' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/attribute.rb:239:in > `query' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/attribute.rb:220:in > `source_value' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/attribute.rb:151:in > `config_value' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/source.rb:112:in > `block in set_source_attributes' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/source.rb:111:in > `each' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/source.rb:111:in > `set_source_attributes' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/source.rb:49:in > `to_riddle_for_core' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/index.rb:114:in > `block in to_riddle_for_core' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/index.rb:113:in > `each' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/index.rb:113:in > `each_with_index' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/index.rb:113:in > `to_riddle_for_core' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/index.rb:83:in > `to_riddle' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/active_record.rb:249:in > `block in to_riddle' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/active_record.rb:248:in > `collect' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/active_record.rb:248:in > `to_riddle' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/configuration.rb:155:in > `block in generate' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/configuration.rb:152:in > `each' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/configuration.rb:152:in > `generate' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/configuration.rb:168:in > `build' > /home/jh/.gem/ruby/1.9.1/gems/thinking-sphinx-2.0.7/lib/thinking_sphinx/tasks.rb:70:in > `block (2 levels) in <top (required)>' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in > invoke_with_call_chain' > /usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in > `invoke_with_call_chain' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in > invoke_prerequisites' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:174:in `each' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:174:in > `invoke_prerequisites' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in > invoke_with_call_chain' > /usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in > `invoke_with_call_chain' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in > `invoke_task' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in > `block (2 levels) in top_level' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in > `block in top_level' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in > `standard_exception_handling' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in > run' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in > `standard_exception_handling' > /var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' > /var/lib/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>' > /var/lib/gems/1.9.1/bin/rake:19:in `load' > /var/lib/gems/1.9.1/bin/rake:19:in `<main>' > Tasks: TOP => ts:config => thinking_sphinx:configure > > cheers > > James > > -- > 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. > -- 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.
