# Thinking sphinx startup issue

**URL:** <https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958>\
**Category:** Rails\
**Created:** [October 4, 2010, 2:41am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958 "2010-10-04T02:41:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 2:41am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/1 "2010-10-04T02:41:31Z")

</div>

when I do rake ts:start I get this error, mac:

private method `new’ called for ThinkingSphinx::Configuration:Class

Ideas??

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 3:37am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/2 "2010-10-04T03:37:41Z")

</div>

How do you have Thinking Sphinx installed? As a gem, or as a plugin?  
Either should be fine, but make sure you don’t have both (and if  
you’re not using the gem, make sure you don’t have any versions of the  
gem installed, as Ruby may get a little confused). Also - make sure  
you don’t have the old GitHub gem installed (freelancing-god-thinking-  
sphinx), as that can also cause conflicts.

The error is appearing because ThinkingSphinx::Configuration is a  
singleton class… but it’s been that way for a long long time (if not  
forever), so I’m not sure what the cause of this is. Can you run the  
rake task with --trace?

rake ts:start --trace

Also: what versions of Rails and Thinking Sphinx are you using?

Cheers

–  
Pat

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:11am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/3 "2010-10-04T04:11:02Z")

</div>

I have only the gem installed. Here is the trace:

\*\* Invoke ts:start (first\_time)  
\*\* Invoke thinking\_sphinx:start (first\_time)  
\*\* Invoke thinking\_sphinx:app\_env (first\_time)  
\*\* Execute thinking\_sphinx:app\_env  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute thinking\_sphinx:start  
rake aborted!  
private method `new' called for ThinkingSphinx::Configuration:Class /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/ryanb-thinking-sphinx-0.9.8/lib/thinking_sphinx/tasks.rb:11 /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in`call’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in  
`execute' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in`each’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in  
`execute' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:597:in`invoke\_with\_call\_chain’  
/Users/chabgood/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/monitor.rb:242:in  
`synchronize' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:590:in`invoke\_with\_call\_chain’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:607:in  
`invoke_prerequisites' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:604:in`each’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:604:in  
`invoke_prerequisites' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:596:in`invoke\_with\_call\_chain’  
/Users/chabgood/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/monitor.rb:242:in  
`synchronize' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:590:in`invoke\_with\_call\_chain’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:583:in  
`invoke' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke\_task’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in  
`top_level' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in`each’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in  
`top_level' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in`standard\_exception\_handling’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2023:in  
`top_level' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2001:in`run’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in  
`standard_exception_handling' /Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:1998:in`run’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/bin/rake:31  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/bin/rake:19:in `load’  
/Users/chabgood/.rvm/gems/ruby-1.8.7-p174/bin/rake:19

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:29am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/4 "2010-10-04T04:29:11Z")

</div>

The stack trace says you’re using Ryan B.’ fork of Thinking Sphinx

- is that deliberate? Or perhaps that should be uninstalled, if it’s  
conflicting?

It’s definitely an old release, well before 1.3.16.

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:17am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/5 "2010-10-04T04:17:29Z")

</div>

Rials 2.3.5 and sphinx 1.3.16

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:47am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/6 "2010-10-04T04:47:55Z")

</div>

Never mind, overlooked that the ryanb was installed as a gem… DOH!  
sorry.

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:40am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/7 "2010-10-04T04:40:53Z")

</div>

Yes, I cannot it is in our production environment right now.

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [October 4, 2010, 4:54am UTC](https://www.ruby-forum.com/t/thinking-sphinx-startup-issue/195958/8 "2010-10-04T04:54:21Z")

</div>

In your production environment for a different site? Or this one? I  
would highly recommend upgrading, either way… but in the meantime,  
you’ll need to change your require statement for the thinking sphinx  
tasks in your Rakefile to have the full path. I’m not quite sure of  
the best way to do this to ensure it’s flexible across environments,  
though…

Essentially, ‘thinking\_sphinx/tasks’ exists in both ryanb-thinking-  
sphinx and thinking-sphinx - and I’m guessing Ruby searches through  
known paths in alphabetical order (R comes before T). You want to make  
sure your app loads from the right gem.

Cheers

–  
Pat
