【发布时间】:2013-07-12 22:43:39
【问题描述】:
我正在尝试在 Rails 4 中使用 sunspot,但遇到了一些问题。当我的 gemfile 中只有 gem 'sunspot_rails', '2.0.0' 时,我收到此错误:
Note: This task has been moved to the sunspot_solr gem. To install, start and
stop a local Solr instance, please add sunspot_solr to your Gemfile:
group :development do
gem 'sunspot_solr'
end
但是当我添加那个 gem(也是 v 2.0.0)时,我得到了这个错误:
rake aborted!
Don't know how to build task 'sunspot:solr:start'
/home/toasty/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
/home/toasty/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
我看过这个问题: Sunspot/Solr raketasks not loading in Rails 3 Mountable Engine 但在我的情况下似乎不起作用。有没有人有任何想法? sunspot_solr 是否与 rails 4 不兼容?
【问题讨论】:
-
我遇到了那个错误,将
gem 'sunspot_solr'添加到开发中并且工作正常!但是看到这个github.com/sunspot/sunspot/wiki/…
标签: ruby-on-rails ruby-on-rails-4 sunspot sunspot-rails sunspot-solr