Search code examples
ruby-on-railswindowssolrsunspot

Having Trouble Starting Sunspot Rails 4.2


Having issues getting sunspot started. I'm on rails 4.2 and Windows 8.

I just installed the gems sunspot_rails and sunspot_solr. The install command works perfectly fine but when I run rake sunspot:solr:start I get this error

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

When I try rake sunspot:solr:run I get the same error.

Someone suggested editing the sunspot_solr/lib/sunspot/solr/java.rb which looks like this

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

But I can't seem to find this folder anywhere. Any help would be greatly appreciated. Thank you!


Solution

  • mhh I think you could just override the method. Create an initializer --> config/initializers/sunspot.rb and put in the code you metioned.