Sunspot Solr does not start with & ldquo; you need a Java Runtime environment to run the Solr server.


Before redeploy my application and restart my server, Sunsport Solr stopped and can`t be started anymore, although it was working before the redeploy + restart. When I run

rake sunspot:solr:run RAILS_ENV=production --trace

I receive the following

** Invoke sunspot:solr:start (first_time)
** Invoke environment (first_time)
** Execute environment
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
** Execute sunspot:solr:start
rake aborted!
You need a Java Runtime Environment to run the Solr server

But java -version return the following:

java version "1.7.0_45"
OpenJDK Runtime Environment (rhel- u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Don`t know what to do anymore, already tried to remove solr folder from the app and run the install again (rails g sunspot_solr:install) , but no lucky...

I`m on Ruby 2.0.0 Rails 4.0.0.rc1 and the last version of sunspot solt

You need to make sure that you have a valid Java Runtime (e.g. /usr/bin/java) and also have a valid JDK installed.

When you run `which java`, if you don't have a valid JDK installed, you will get an error to that effect.

You will not be able to run the Solr server if you don't have both installed.