简体   繁体   English

未初始化的常量ThoughtSphinx

[英]uninitialized constant ThinkingSphinx

I am running Rails 4.0.2 on Ruby 2.1.0, Sphinx 2.1.9 and thinking-sphinx 3.1.1 我在Ruby 2.1.0,Sphinx 2.1.9和Thinking-Sphinx 3.1.1上运行Rails 4.0.2
I've setup the search action in the home controller 我已经在家庭控制器中设置了搜索操作

def search
  @objects = ThinkingSphinx.search params[:search]
end

and I'm getting the 我正在

uninitialized constant HomeController::ThinkingSphinx

I have successfully indexed and started sphinx server. 我已经成功索引并启动了狮身人面像服务器。
I have also restarted my rails server a couple of times. 我还重新启动了Rails服务器几次。
When I try to run the search from the console it works like a charm. 当我尝试从控制台运行搜索时,它就像一个超级按钮。
Am I doing something wrong or its some kind of bug? 我是在做错什么还是某种错误?

Hmm it seems it works now! 嗯,看来现在可以了! I've upgraded rails to 4.0.4 and i rebooted my vps, so the sphinx searchd daemon and my rails app were assigned with different pid. 我已经将Rails升级到4.0.4,并且重新启动了我的vps,因此sphinx searchd守护程序和我的rails应用程序分配了不同的pid。 Looks like that solved it. 看起来就解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM