0

通过 Gemfile 安装 Thinking Sphinx:

gem 'thinking-sphinx',:git => 'git://github.com/freelancing-god/thinking-sphinx.git'

当我运行时rake thinking_sphinx:configure,我得到:

Unsupported version: 2.0.5

...但它生成的配置文件很好。当我运行重建(也启动狮身人面像)时,一切看起来都很好。但是当我启动 Rails 控制台(或我的应用程序)时,我得到了这个,我很困惑为什么:

Unsupported version: 2.0.5


For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html

/usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/1.9.1/test/unit/assertions.rb:4:in `<top (required)>': Test is not a module (TypeError)
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/1.9.1/test/unit/testcase.rb:1:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/test_case.rb:1:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/console/app.rb:2:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:299:in `initialize_console'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:152:in `load_console'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands/console.rb:27:in `start'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /usr/local/Cellar/ruby/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from /Users/jim/projects/rubymine/xx/script/rails:6:in `require'
from /Users/jim/projects/rubymine/xx/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
4

1 回答 1

0

Rails wizard I know fixed this project by using these:

gem 'riddle', '1.5.1' 
gem 'thinking-sphinx', '2.0.11', :require => "thinking_sphinx"
于 2012-08-09T16:10:39.137 回答