思考sphinx postgres ruby​​ on rails rake ts:start

时间:2013-04-14 14:03:53

标签: ruby-on-rails-3 thinking-sphinx

我想在我的应用程序上运行思考sphinx。当我运行rake ts:start时出现此错误 sphinx 2.0.7
思考sphinx 2.0.10
轨道3.2.11
红宝石1.9.2p290
psql(9.1.9)

/rails_projects/my_app$ rake ts:start RAILS_ENV=development --trace
** Invoke ts:start (first_time)
** Invoke thinking_sphinx:start (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Execute thinking_sphinx:start
rake aborted!
searchd is already running.
/home/andrew/.rvm/gems/ruby-1.9.2-p290/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/tasks.rb:32:in `block (2 levels) in <top (required)>'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/home/andrew/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain'
/home/andrew/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/bin/rake:19:in `load'
/home/andrew/.rvm/gems/ruby-1.9.2-p290@global/bin/rake:19:in `<main>'
/home/andrew/.rvm/gems/ruby-1.9.2-p290/bin/ruby_noexec_wrapper:14:in `eval'
/home/andrew/.rvm/gems/ruby-1.9.2-p290/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => ts:start => thinking_sphinx:start

/ rails_projects / my_app $ searchd

Sphinx 2.0.7-release (r3759)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

FATAL: no readable config file (looked in /usr/local/etc/sphinx.conf, ./sphinx.conf).

在/ usr / local / etc / only example.sql sphinx.conf.dist sphinx-min.conf.dist

/ rails_projects / my_app $ ps aux | grep searchd

user   23487  0.0  0.0  16392  1612 pts/0    S    15:39   0:01 searchd --pidfile --config /home/user/rails_projects/my_app/config/development.sphinx.conf
user   25808  0.0  0.0   5616   832 pts/0    S+   19:23   0:00 grep --colour=auto searchd

1 个答案:

答案 0 :(得分:1)

searchd是Sphinx搜索守护进程 - 所以它说的是Sphinx已经在运行。如果你运行ps aux | grep searchd,你就可以轻松地发现这个过程。如果您需要重新启动它,请运行rake ts:restart,或rake ts:stop,然后 rake ts:start