title: Capistrano can't find a JavaScript runtime
body: <p>I have a problem with Capistrano deploying to a server with RVM and gemsets</p>
  
  <pre><code>executing `deploy:assets:precompile'
  * executing "cd /var/app/releases/20111229233555 &amp;&amp; rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
  *** [err ::] rake aborted!
  *** [err ::] Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
  *** [deploy:update_code] rolling back
  failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.2@mygemset' -c 'cd /var/app/releases/20111229234715 &amp;&amp; rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'"
  </code></pre>
  
  <p>This is my Capfile</p>
  
  <pre><code>  $:.unshift(File.expand_path('./lib', ENV['rvm_path']))
    require 'rvm/capistrano'
    set :rvm_bin_path, "$HOME/.rvm/bin"
    set :rvm_ruby_string, '1.9.2@mygemset'
    set :rvm_type, :user
    load 'deploy/assets'
  </code></pre>
  
  <p>When I log in as the very same user which is used by Capistrano the failing command is executed without any problems.</p>
  
  <p>It seems that Capistrano is using some other environment. </p>
  
  <p>Here is my <code>~/.rvmrc</code> file:</p>
  
  <pre><code>   rvm_gemset_create_on_use_flag=1 rvm_trust_rvmrcs_flag=1
  </code></pre>
  
  <p>Is there a way how to check which ruby and gemset is used at the execution time?</p>
  
  <p>node.js is and V8 are installed on the system, and all needed gems are in Gemfile:</p>
  
  <p>here is my <code>rvm info</code>:</p>
  
  <pre><code>   ruby:
      interpreter:  "ruby"
      version:      "1.9.2p290"
      date:         "2011-07-09"
      platform:     "x86_64-linux"
      patchlevel:   "2011-07-09 revision 32553"
      full_version: "ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]"
  
    homes:
      gem:          "/home/capistrano/.rvm/gems/ruby-1.9.2-p290@mygemset"
      ruby:         "/home/capistrano/.rvm/rubies/ruby-1.9.2-p290"
  
    binaries:
      ruby:         "/home/capistrano/.rvm/rubies/ruby-1.9.2-p290/bin/ruby"
      irb:          "/home/capistrano/.rvm/rubies/ruby-1.9.2-p290/bin/irb"
      gem:          "/home/capistrano/.rvm/rubies/ruby-1.9.2-p290/bin/gem"
      rake:         "/home/capistrano/.rvm/gems/ruby-1.9.2-p290@mygemset/bin/rake"
  </code></pre>