2013-07-30 1 views
4

heroku 부가 기능의 flying_sphinx에 대한 설정 지침을 따르면 thinking_sphinx ~ 2.5에서 3.0.3으로 업그레이드 중입니다. 업그레이 드는 전혀 필요하지 않을 수도 있지만, 지금은 그렇게 할 수도 있습니다.'127.0.0.1'(61) 레일에서 MySQL 서버에 연결할 수 없습니다. thinking_sphinx

내가 검색 할 때 (예를 들어 Post.search() "라는 용어를 검색") 나는 다음 수를 :

Can't connect to MySQL server on '127.0.0.1' (61) 

나는 post_index.rb

ThinkingSphinx::Index.define :post, :with => :active_record do 
    (. . . code here . . .) 
end 
내 인덱스 폴더 설정을 가지고

그리고 내 설정/thinking_sphinx.yml 파일

development: 
version: 3.0.3 
mysql41: 9110 
morphology: stem_en 
html_strip: 1 
min_infix_len: 2 
bin_path: "/usr/local/bin" 
searchd_binary_name: searchd 
indexer_binary_name: indexer 
host: 127.0.0.1 
test: 
version: 3.0.3 
mysql41: 9110 
morphology: stem_en 
html_strip: 1 
min_infix_len: 2 
production: 
version: 3.0.3 
mysql41: 9110 
morphology: stem_en 
html_strip: 1 
min_infix_len: 2 

및 Gemfile

이 6,
gem 'mysql2',   '0.3.12b5' 
gem 'thinking-sphinx', '3.0.3' #'2.0.11' 
gem 'flying-sphinx', '1.0.0' #'0.8.4' 

내가

감사에게 Heroku에 로컬 및 포스트 그레스를 실행하고 있습니다!

편집

지금 내 thinking_sphinx.yml은 다음과 같습니다

development: 
    mysql41: 9110 
    morphology: stem_en 
    html_strip: 1 
    min_infix_len: 2 
    bin_path: "/usr/local/bin" 
    host: 127.0.0.1 
test: 
    mysql41: 9111 
    morphology: stem_en 
    html_strip: 1 
    min_infix_len: 2 
production: 
    morphology: stem_en 
    html_strip: 1 
    min_infix_len: 2 

내가 searchd에 노력 현재 실행되지 않을 때.

Stopped searchd daemon (pid:). 
Generating configuration to /Users/Achilles/Desktop/dev/mocs/config/development.sphinx.conf 
Sphinx 2.0.6-release (r3473) 
Copyright (c) 2001-2012, Andrew Aksyonoff 
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) 

using config file '/blah/blah/blah/development.sphinx.conf'... 
indexing index 'post_core'... 
ERROR: index 'post_core': infixes and morphology are enabled, enable_star=0 
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg 
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg 
Failed to start searchd daemon. Check /Users/Achilles/Desktop/dev/mocs/log/development.searchd.log. 
Failed to start searchd. Check the log files for more information. 

답변

3

다음과 같은 것들을 변경할 수 있습니다 : 당신의 thinking_sphinx.yml 파일에서

  • version 설정을 제거합니다. 이 설정은 스핑크스의 버전을 확인하는 데 사용되며 은 아니며 Thinking Sphinx이 아닙니다.
  • TS v3.0.4로 업데이트 - 중요하지는 않지만 최신 사항을 사용하지 않아도됩니다.
  • 프로덕션 환경에 mysql41을 설정하지 마십시오. 개발 및 테스트마다 다른 값으로 설정하는 것이 가장 좋기 때문에 동시에 두 환경 모두에서 데몬을 실행할 수 있습니다.
  • *_binary_name 설정을 삭제할 수도 있습니다. 설정을 기본값으로 지정 했으므로 그다지 중요하지 않습니다.

일단 변경되면 rake ts:rebuild을 실행하여 연결할 수 있는지 확인하십시오.하지만 그 시점에서이 문제가 로컬 또는 Heroku 중 어디에서 발생하는지 확인해 볼 가치가 있습니까?

+0

고마워요! 지금 당장 문제가 발생합니다. 우리는 조금 볼 것입니다. 상황이 여전히 작동하지 않는 경우 : o (내 편집 – ajbraus

+0

을 참조하십시오.) 접미사 또는 접두어를 사용하는 경우 Sphinx는 enable_star를 true로 설정해야한다고 생각합니다. config/thinking_sphinx.yml의 각 환경에이를 추가하고 도움이됩니다. – pat

+0

그게 효과적입니다! 고마워요. 이제 다른 문제로 부딪 힙니다. http://stackoverflow.com/questions/17963593/sphinxql-syntax-error-unexpected-ident – ajbraus

관련 문제