Deployment using Capistrano, JAVA_HOME is not readable

I am deploying with Capistrano and everything looked good until I got to the Rjb part.

I can do

$ echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk-amd64 

Moreover, I can do gem install rjb on the server and it installs ...

However, when I try:

 $ cap bundle:install 

I get

 ** [out :: ec-...compute-1.amazonaws.com] extconf.rb:53:in `<main>': JAVA_HOME is not set. (RuntimeError) 
+4
source share
1 answer

Capistrano does not load environment variables from the deployment machine or deployment target; you will need to specify them in your deploy.rb:

 set :default_environment, 'JAVA_HOME' => "/usr/lib/jvm/java-6-openjdk-amd64" 
0
source

All Articles