sunspot_rails gem - " Errno:: ECONNREFUSED (Connection refused - connect (2)) "
Have you started the Solr server?
rake sunspot:solr:start
If not than start the solr server first
And If yes than try
rake sunspot:solr:run
Hope this will help .
Just configure the rake task with the test environment:
rake sunspot:solr:run RAILS_ENV=test
Make sure your rails app is looking for the solr server on the correct port.