无法启动 Sunspot Rails 4.2

Having Trouble Starting Sunspot Rails 4.2

启动 sunspot 时遇到问题。我在 rails 4.2 和 Windows 8.

我刚刚安装了 gem sunspot_rails 和 sunspot_solr。安装命令工作得很好但是当我 运行 rake sunspot:solr:start 我得到这个错误

This command is not supported on i386-mingw32. Use rake sunspot:solr:run to run Solr in the foreground.

当我尝试 rake sunspot:solr:run 时,我得到了同样的错误。

有人建议编辑 sunspot_solr/lib/sunspot/solr/java.rb,如下所示

module Sunspot
 module Solr
  module Java
   def self.installed?
     `java -version`
     $?.success?
   end
  end
 end
end

但我似乎无法在任何地方找到这个文件夹。任何帮助将不胜感激。谢谢!

mhh 我认为您可以重写该方法。创建一个初始值设定项 --> config/initializers/sunspot.rb 并放入您提到的代码。