I had a lot of problems starting Sunspot Solr, especially after rebooting the server initiated by Host.
Now I'm sure there are ways to create a startup script that will be launched by my server, or maybe monit is the way to go. But I think that all I really need is to start the Solr server when my application starts, so now I put this in the initializer:
begin
Sunspot::Rails::Server.new.start
rescue
end
Tried it locally and it seemed to work.
It's horrible? Is there a quick and easy way that is better?
source
share