Can you share the contents of your sphinx.yml file? Sounds like it's not quite formatted correctly...
That said, all models should be there - this is certainly an odd problem. Wonder if it's related to the project rather than Lion...
--
Pat
On 12/08/2011, at 5:26 AM, Aaron B. Russell wrote:
> I recently wiped my laptop to install Mac OS X Lion, and am having some trouble setting up Thinking Sphinx in my development environment again. This situation has been replicated on another developer's laptop while he was trying to set up the same project.
>
> When trying to run "rake thinking_sphinx:index" for the first time and letting it autocreate my development.sphinx.conf, I'm seeing certain models being completely skipped. Not mentioned in the output of "rake thinking_sphinx:index", and no mention of them in the resulting development.sphinx.conf ... it's as if I've failed to mention that those models should be indexed. These models were previously being indexed... infact they still are in our production environment, but of course we don't want to remove the production.sphinx.conf there and try rebuilding because it seems quite likely that our production environment will just break the same way it has on our development machines.
>
> Searching for people having similar problems (both here in this group and elsewhere on the Internet) hasn't turned up more than a few threads. I did see Pat mention in one thread that if a model's .rb file failed to compile for some reason, TS would be unable to parse it so would skip it, so I tested one of the skipped models by firing up "rails console" and just typing the name of that model to see if any errors came back... but I saw no errors.
>
> I also saw a thread where Pat suggested a workaround of using an "indexed_models" block in config/sphinx.yml, but doing that (listing all models that should be indexed), and then deleting development.sphinx.conf and all of Sphinx's database files, then running "rake thinking_sphinx:index" just gets me this output:
> Generating Configuration to /Users/arussell/Sites/deucescracked-rails3/config/development.sphinx.conf
> rake aborted!
> You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.select
>
> (See full trace by running task with --trace)
>
> Possibly relevant information:
> • Mac OS X Lion (10.7.0)
> • Ruby 1.8.7 (Ruby Enterprise Edition 2011.03)
> • Sphinx v0.9.9 (r2117)
> •
> • Relevant gems:
> •
> • riddle (1.4.0)
> • thinking-sphinx (2.0.5)
> •
> • ts-datetime-delta (1.0.2)
> • ts-delayed-delta (1.1.2)
> Does anyone have any other suggestions I could try?
>
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/PqUpbl-H9ooJ.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
Generating Configuration to /Users/arussell/Sites/projectname/config/development.sphinx.conf
rake aborted!You have a nil object when you didn't expect it!You might have expected an instance of Array.The error occurred while evaluating nil.select(See full trace by running task with --trace)
defaults: &defaultsmatch_mode: extended2enable_star: 1min_prefix_len: 3auto_escape_characters: |-!@*<()bin_path: /usr/local/bin/searchd_binary_name: searchddevelopment:mem_limit: 256msearchd_file_path: /Users/arussell/Sites/projectname/db/sphinxsearchd_files: /Users/arussell/Sites/projectname/db/sphinxconfig_file: /Users/arussell/Sites/projectname/config/development.sphinx.confindexed_models:- Article- Blog- BlogComment- BlogEntry- Coach- Forum- ForumCategory- Playlist- Podcast- Podshow- Post- Series- Topic- User- Video- VideoFile<<: *defaults
The syntax looks fine to me - can you provide the entire output when running the following:
rake ts:configure --trace
--
Pat
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/wdurhcPi_hUJ.
You're not manually requiring the models anywhere, are you?
--
Pat
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/_9TSgepQD7kJ.
If you can, try removing all the manual requires (at least ones related to models), and see if that helps things - both with and without the manual indexed_models setting in sphinx.yml.
--
Pat
On 13/08/2011, at 11:27 PM, Aaron B. Russell wrote:
> Hrm, it does seem that some of the models are indeed manually requiring other models. At first glance, I'm not sure why we're doing that though. From the sound of your last message it seems like requiring models from other models is a bad thing to do?
>
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/6qsSyLqpmLQJ.
--
Pat
On 15/08/2011, at 8:13 AM, Aaron B. Russell wrote:
> Thanks for explaining. :)
>
> Okay so digging a little deeper I found that it was just a custom class with no superclass (so not actually a model) that just happened to be in app/models (the file's location threw me). Moving it to lib/ made no difference unfortunately, I'm getting the exact same results as before.
>
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/E963TOSBAlgJ.