---
title: "使用 Thinking Sphinx 调用新版本 sphinx-for-chinese 时常见的错误"
author: "tiroc"
date: "2012-09-17T18:21:02Z"
tags: []
categories: ["编程语言"]
slug: "thinking-sphinx-sphinx-for-chinese"
draft: false
lastmod: "2012-09-17T18:22:23Z"
id: 1679974
url: "https://tiroc.iteye.com/blog/1679974"
---

由于 Thinking Sphinx 和它底层的 Riddle 对新版本的 sphinx-for-chinese 识别有问题，所以如果你使用高于 0.9.9 的 sphinx-for-chinese 会看见以下错误：

**问题一：**

> 
> Sphinx cannot be found on your system. You may need to configure the following
> settings in your config/sphinx.yml file:
>   * bin_path
>   * searchd_binary_name
>   * indexer_binary_name
> 
> 
> For more information, read the documentation:
> http://freelancing-god.github.com/ts/en/advanced_config.html
> 


**问题二：**

> 
> Riddle cannot detect Sphinx on your machine, and so can't determine which
> version of Sphinx you are planning on using. Please use one of the following
> lines after "require 'riddle'" to avoid this warning.
> 
>   require 'riddle/0.9.8'
>   # or
>   require 'riddle/0.9.9'
>   # or
>   require 'riddle/1.10'
> 


**问题三：**
执行 rake ts:stop 等任务时报错

> 
> rake aborted!
> execution expired
> 


解决办法是在 config/sphinx.yml 中把你实际使用的 Sphinx 版本写上：

```yaml

development:
  version: 2.1.0

```