I am trying to start the sunspot_solr but it is giving me the following error
Sunspot::Solr::Server::JavaMissing: You need a Java Runtime Environment to run the Solr server
I have java runtime on my mac and I have tried searching on stack overflow but could not get any solution.
Saurabhs-MacBook-Pro% java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Saurabhs-MacBook-Pro% bundle exec rake --execute 'puts `which java`'
/usr/bin/java
Saurabhs-MacBook-Pro% which java
/usr/bin/java
Appreciate your help.
Solr has started working after re-installing jre 7 and jdk 7. It might be because earlier I had openJDK and now I have switched to oracle.