ruby-on-railssolrsunspotsunspot-rails

How to configure Solr standalone in Production server with Rails application using sunspot gem?


I'm looking to deploy solr-8 in production as standalone mode with Ruby on Rails application. While running bundle exec rake sunspot:solr:reindex getting this error

RSolr::Error::Http - 500 Internal Server Error 

Any help would be appreciated!

using gem sunspot in development and is working fine with standalone solr-8 on local machine.

Solr is running in cloud mode. Please share the configuration which is used to talk to solr and rails for index


Solution

  • It's really straight forward setup but took long time for me to resolve. In standalone mode it is bit tricky to communicate with rails we need to copy schema.xml and solrconfig.xml to server/solr/your-core/conf/ as Solr-8 have some deprecation warning. Please carefully read warnings. Once you copied files restart solr and run

    rake sunspot:solr:reindex