title: How to set correct value for JRUBY_HOME if I am using rbenv
body: <p>I installed JRuby with rbenv</p>
  
  <pre><code>ruby -v
  jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_01) [linux-amd64-java]
  
  which ruby
  ~/.rbenv/shims/ruby
  
  gem env
  RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.24
    - RUBY VERSION: 1.9.2 (2012-05-01 patchlevel 312) [java]
    - INSTALLATION DIRECTORY: /home/myjava_api/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: /home/myjava_api/.rbenv/versions/jruby-1.6.7.2/bin/jruby
    - EXECUTABLE DIRECTORY: /home/myjava_api/.rbenv/versions/jruby-1.6.7.2/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - universal-java-1.7
    - GEM PATHS:
       - /home/myjava_api/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8
       - /home/myjava_api/.gem/jruby/1.9
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :benchmark =&gt; false
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
       - "install" =&gt; "--no-rdoc --no-ri"
       - "update" =&gt; "--no-rdoc --no-ri"
    - REMOTE SOURCES:
       - http://rubygems.org/
  </code></pre>
  
  <p>But $JRUBY_HOME is not set</p>
  
  <p>When I set $JRUBY_HOME to "/home/myjava_api/.rbenv/versions/jruby-1.6.7.2/bin/jruby" and after re-login when I executed "<strong>ruby -v</strong>" I got error: "<strong>Error: Could not find or load main class org.jruby.Main</strong>"</p>
  
  <p>When I remove $JRUBY_HOME variable "<strong>ruby -v</strong>" works fine</p>
  
  <p>What must be correct $JRUBY_HOME value?</p>