Q:

Suddenly getting Solr "SEVERE: REFCOUNT ERROR" error in Rails app using Sunspot

My app started showing errors such as the following:
RSolr::RequestError in ProjectsController#index

Solr Response: Severe_errors_in_solr_configuration__Check_your_log_files_for_more_detailed_information_on_what_may_be_wrong__If_you_want_solr_to_continue_after_configuration_errors_change____abortOnConfigurationErrorfalseabortOnConfigurationError__in_null___javalangRuntimeException_javaioFileNotFoundException_no_segments_file_found_in_orgapachelucenestoreNIOFSDirectoryUsersrobertProjectsOfficeCodeofficesolrdatadevelopmentindex_files__at_orgapachesolrcoreSolrCoregetSearcherSolrCorejava1068__at_orgapachesolrcoreSolrCoreinitSolrCorejava579__at_orgapachesolrcoreCoreContainer$InitializerinitializeCoreContainerjava137__at_orgapachesolrservletSolrDispatchFilterinitSolrDispatchFilterjava83__at_orgmortbayjettyservletFilterHolderdoStartFilterHolderjava99__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyservletServletHandlerinitializeServletHandlerjava594__at_orgmortbayjettyservletContextstartContextContextjava139__at_orgmortbayjettywebappWebAppContextstartContextWebAppContextjava1218__at_orgmortbayjettyhandlerContextHandlerdoStartContextHandlerjava500__at_orgmortbayjettywebappWebAppContextdoStartWebAppContextjava448__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerCollectiondoStartHandlerCollectionjava147__at_orgmortbayjettyhandlerContextHandlerCollectiondoStartContextHandlerCollectionjava161__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerCollectiondoStartHandlerCollectionjava147__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerWrapperdoStartHandlerWrapperjava117__at_orgmortbayjettyServerdoStartServerjava210__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40_

When I run $ rake sunspot:solr:reindex I get a similar error. In my ~/log/sunspot-solr-development.log file I see the following:
SEVERE: REFCOUNT ERROR: unreferenced org.apache.solr.core.SolrCore@78497062 (null) has a reference count of 1

I've looked around but can't find a solution. I'm running localhost on Mac OS X. Any ideas? Thanks.
UPDATE: I noticed the following errors in ~/log/sunspot-solor-development.log after running $ rake sunspot:solr:start: https://gist.github.com/1672392

A:

I don't know what the issue was, but I ran the following and it now works:
$ rake sunspot:solr:stop
$ rake sunspot:solr:run
    (in /Users/robert/Projects/Office/Code/office)
    2012-01-24 15:48:21.212::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
    2012-01-24 15:48:21.351::INFO:  jetty-6.1.3
    2012-01-24 15:48:21.419::INFO:  Extract jar:file:/Users/robert/.rvm/gems/ruby-1.9.2-p180/gems/sunspot-1.2.1/solr/webapps/solr.war!/ to /var/folders/3l/3lUM0t5IHDOLLXJAQqlW2U+++TM/-Tmp-/Jetty_0_0_0_0_8982_solr.war__solr__-2c5peu/webapp
    2012-01-24 15:48:22.902::INFO:  Started SocketConnector @ 0.0.0.0:8982
$ (Ctrl-C to shut down solr)
    ^C2012-01-24 15:50:02.149::INFO:  Shutdown hook executing
    2012-01-24 15:50:02.178::INFO:  Shutdown hook complete
$ rake sunspot:solr:start
    (in /Users/robert/Projects/Office/Code/office)
$ rake sunspot:solr:reindex
    (in /Users/robert/Projects/Office/Code/office)

