繁体   English   中英

Ruby on Rails,狮身人面像。 错误:不知道如何构建任务“ thinking_sphinx:index”

[英]Ruby on rails, Sphinx. error : Don't know how to build task 'thinking_sphinx:index'

我是第一次使用Spinx。 我已经按照此处的说明安装了gems: http : //pat.github.io/thinking-sphinx/

他们安装得很好。 这是我的宝石清单:

*** LOCAL GEMS ***

actionmailer (4.1.1, 4.1.0, 4.0.4, 3.2.13)
actionpack (4.1.1, 4.1.0, 4.0.4, 3.2.13)
actionview (4.1.1, 4.1.0)
activemodel (4.1.1, 4.1.0, 4.0.4, 3.2.13)
activerecord (4.1.1, 4.1.0, 4.0.4, 3.2.13, 2.3.18)
activerecord-deprecated_finders (1.0.3)
activeresource (3.2.13)
activesupport (4.1.1, 4.1.0, 4.0.4, 3.2.13, 2.3.18)
after_commit (1.0.11)
annotate (2.5.0)
appraisal (0.4.0)
arel (5.0.1.20140414130214, 4.0.2, 3.0.2)
bcrypt-ruby (3.0.1)
bigdecimal (1.2.4)
bootstrap-sass (2.1.0.0)
bootstrap-will_paginate (0.0.9)
builder (3.2.2, 3.1.4, 3.0.4)
bundler (1.6.2)
bundler-unload (1.0.2)
capybara (1.1.2)
childprocess (0.3.9)
coffee-rails (4.0.1, 3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.7.0, 1.6.2)
cucumber (1.0.2)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (2.0.2, 1.4.0)
executable-hooks (1.3.1)
factory_girl (4.1.0)
factory_girl_rails (4.1.0)
faker (1.1.2, 0.3.1)
ffi (1.8.1)
gem-wrappers (1.2.4)
gherkin (2.4.21)
hike (1.2.3, 1.2.2)
i18n (0.6.9, 0.6.1)
innertube (1.1.0)
io-console (0.4.2)
jbuilder (2.0.7, 2.0.6, 1.5.3)
jdbc-mysql (5.1.28)
joiner (0.3.0)
journey (1.0.4)
jquery-rails (3.1.0, 2.0.2)
json (1.8.1, 1.8.0)
mail (2.5.4)
middleware (0.1.0)
mime-types (1.25.1, 1.23)
minitest (5.3.4, 5.3.3, 4.7.5)
multi_json (1.10.1, 1.10.0, 1.9.2, 1.7.3)
mysql2 (0.3.15, 0.3.12b5, 0.3.11, 0.2.23)
nokogiri (1.5.9)
pg (0.9.0)
polyglot (0.3.4, 0.3.3)
psych (2.0.3)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (4.1.1, 4.1.0, 4.0.4, 3.2.13)
railties (4.1.1, 4.1.0, 4.0.4, 3.2.13)
rake (10.3.2, 10.3.1, 10.2.2, 10.1.0, 10.0.4)
rdoc (4.1.1, 4.1.0, 3.12.2)
riddle (1.5.11)
rspec (2.11.0, 2.6.0)
rspec-core (2.11.1, 2.6.4)
rspec-expectations (2.11.3, 2.6.0)
rspec-mocks (2.11.3, 2.6.0)
rspec-rails (2.11.0)
rubygems-bundler (1.4.3)
rubyzip (0.9.9)
rvm (1.11.3.9)
sass (3.2.19, 3.2.9)
sass-rails (4.0.3, 3.2.5)
sdoc (0.4.0)
selenium-webdriver (2.32.1)
spring (1.1.3, 1.1.2)
sprockets (2.12.1, 2.11.0, 2.2.2)
sprockets-rails (2.1.3, 2.0.1)
sqlite3 (1.3.9)
term-ansicolor (1.3.0)
test-unit (2.1.1.0)
thinking-sphinx (3.1.1)
thor (0.19.1, 0.18.1)
thread_safe (0.3.3, 0.3.2)
tilt (1.4.1)
tins (1.3.0)
treetop (1.4.15, 1.4.12)
turbolinks (2.2.2, 2.2.1)
tzinfo (1.1.0, 0.3.39, 0.3.37)
uglifier (2.5.0, 1.2.3)
websocket (1.0.7)
will_paginate (3.0.4, 2.3.15)
xpath (0.1.4)
yard (0.8.7.4)

我在应用程序中创建了索引文件,然后添加了new_thread_index.rb

ThinkingSphinx::Index.define :new_thread, :with => :active_record do

  indexes title, :sortable => true

  indexes description

end

跑:

rake ts:index

我收到错误消息:

rake aborted!
Don't know how to build task 'ts:index'

(See full trace by running task with --trace)

我想念什么吗?

我回答这个问题很愚蠢。 我安装了宝石

安装gem gemname

并没有将这些游戏添加到我的应用中。 因此与这些宝石相关的耙子无法工作。 我要做的就是将gems添加到我的应用程序的gemfile中,并进行捆绑安装。 就这样!

暂无
暂无

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

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