freelancing-god/thinking-sphinx — Issue #323: rake ts:config is broken
Author: mguterl
Created: 2011-12-27 17:18:00+00:00
State: open

I followed the installation instructions here:

http://freelancing-god.github.com/ts/en/rails3.html

I have added define_index to my model:

define_index
indexes :first_name
end

When I run any of the ts:* rake tasks I get the following error:

```
** 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 /Users/michaelguterl/code/rm/midwife/config/development.sphinx.conf
rake aborted!
undefined method `indexes' for #
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/thinking-sphinx-2.0.5/lib/thinking_sphinx/configuration.rb:159:in `generate'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/thinking-sphinx-2.0.5/lib/thinking_sphinx/configuration.rb:177:in `build'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/thinking-sphinx-2.0.5/lib/thinking_sphinx/tasks.rb:70
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/Users/michaelguterl/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/Users/michaelguterl/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/gems/rake-0.9.2.2/bin/rake:33
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/bin/rake:19:in `load'
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2011.03@midwife/bin/rake:19
Tasks: TOP => ts:config => thinking_sphinx:configure
```

Here is the relevant section my Gemfile.lock

```
+ thinking-sphinx (2.0.5)
+ activerecord (>= 3.0.3)
+ riddle (>= 1.3.3)
```

Here are my installed gems:

```
action_mailer_verp (0.3.2)
actionmailer (3.1.3)
actionpack (3.1.3)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3)
addressable (2.2.4)
airbrake (3.0.5)
amq-client (0.8.6)
amq-protocol (0.8.4)
amqp (0.8.3)
arel (2.2.1)
builder (3.0.0)
bundler (1.0.21)
bunny (0.7.8)
capistrano (2.9.0)
capybara (1.1.2)
childprocess (0.2.3)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.1.3)
columnize (0.3.5)
configuration (1.3.1)
css_parser (1.2.5)
cucumber (1.0.6)
cucumber-rails (1.0.2)
database_cleaner (0.7.0)
diff-lcs (1.1.3)
email_spec (1.2.1)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.9)
factory_girl (2.3.2)
factory_girl_rails (1.4.0)
faraday (0.6.1)
ffi (1.0.11)
gherkin (2.4.21)
highline (1.6.8)
hike (1.2.1)
hookup (1.1.0)
htmlentities (4.3.1)
i18n (0.6.0)
jquery-rails (1.0.19)
json (1.6.2)
kgio (2.6.0)
launchy (0.3.5)
libv8 (3.3.10.4 x86-darwin-11)
linecache (0.46)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.4)
multi_xml (0.2.2)
multipart-post (1.1.4)
mustache (0.99.4)
mysql2 (0.3.10)
net-ldap (0.2.2)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.2.1)
net-ssh-gateway (1.1.0)
newrelic_rpm (3.3.0)
nokogiri (1.4.7)
oa-basic (0.2.6)
oa-core (0.2.6)
oa-enterprise (0.2.6)
oa-more (0.2.6)
oa-oauth (0.2.6)
oa-openid (0.2.6)
oauth (0.4.5)
oauth2 (0.4.1)
omniauth (0.2.6)
polyglot (0.3.3)
premailer (1.7.3)
pyu-ruby-sasl (0.0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-openid (1.3.1)
rack-protection (1.1.4)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.3)
railties (3.1.3)
raindrops (0.8.0)
rake (0.9.2.2, 0.8.7)
rbx-require-relative (0.0.5)
rdoc (3.11)
redis (2.2.2)
redis-namespace (1.0.3)
redis-objects (0.5.2)
resque (1.19.0)
resque-retry (0.2.1)
resque-scheduler (1.9.9)
rest-client (1.6.7)
riddle (1.5.0)
rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
rubyntlm (0.1.1)
rubyzip (0.9.5)
rufus-scheduler (2.0.13)
sass (3.1.11)
sass-rails (3.1.5)
selenium-webdriver (2.14.0)
simple_form (1.4.2)
sinatra (1.3.1)
sprockets (2.0.3)
SystemTimer (1.2.3)
term-ansicolor (1.0.7)
therubyracer (0.9.9)
thinking-sphinx (2.0.5)
thor (0.14.6)
tilt (1.3.3)
timecop (0.3.5)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.1.0)
unicorn (4.1.1)
vegas (0.1.8)
will_paginate (3.0.2)
wirble (0.1.3)
xpath (0.1.4)
```