September 16, 2008 11:21
Posted by Jeremy Durham
thinking-sphinx and Merb, round 2
Recently, I built a music review site for a friend using Merb + Thinking-Sphinx (check it out). I ran into a few issues with Thinking-sphinx + Merb, and wanted to document them here in case anyone has similar issues going forward.
merb_helpers and thinking-sphinx conflict
When using merb_helpers and requiring thinking-sphinx, instead of using dependency, form_contexts seem to “go away”. This means that all merb_helpers stop working. I changed the gem name to thinking_sphinx, installed it and used “dependency ‘thinking_sphinx’”, and all was well.
Thinking Sphinx always runs in development mode
Merb no longer sets the MERB_ENV environment variable, which Thinking Sphinx uses to determine what environment Merb is running in. Using Merb.environment is a better way now to determine what mode Merb is running in.
Thinking Sphinx rake tasks depend on the merb_init rake task, which doesn’t exist
merb_env is the correct rake task, not merb_init
So far, I have enjoyed using Thinking Sphinx. Pat Allan (the author of TS) has been awesome about responding to issues and working with me to resolve them.
UPDATE These issues have been resolved in thinking_sphinx master.








