my setup: Rails 4, Heroku with Websolr addon.
The Solr search was been working just fine for months with my Rails 4 (production) application. Then one day it quit and I went through the following stackoverflow answers and none of them worked.
Since I didn't have java installed at one point, they were pretty tedious to go through, but I do need to mention before I answer this that I went through all three answers BEFORE I solved it, so something I did above may have enabled it.