我实际上正在尝试为 Rails ( https://github.com/sunspot/sunspot ) 安装和使用 Sunspot gem。到目前为止,这就是我所做的。我在我的添加了依赖项Gemfile
:
gem 'sunspot_rails'
gem 'sunspot_solr'
然后我确实运行bundle
并使用rails generate sunspot_rails:install
. 到目前为止,一切都很好。
但是,当我尝试运行时bundle exec rake sunspot:solr:start
,我遇到了以下错误:
rake aborted!
Don't know how to build task 'sunspot:solr:start'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task_manager.rb:49:in `[]'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:148:in `invoke_task'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/project/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/project/.rbenv/versions/2.0.0-p247/bin/rake:23:in `load'
/Users/project/.rbenv/versions/2.0.0-p247/bin/rake:23:in `<main>'
我实际上使用的是 Rails 4 和 Ruby 2.0.0。有没有人已经面临同样的问题或知道解决这个问题的方法?
非常感谢您的帮助