title: How do I use JRUBY_OPTS with RVM?
body: <p>It seems that the idiomatic way to provide flags to JRuby in an RVM-based Rails project is to set the environmental variable JRUBY_OPTS or PROJECT_JRUBY_OPTS, the latter perhaps being done automatically, since I see I can uncomment this line from my project directory's <code>.rvmrc</code>:</p>
  
  <pre><code>PROJECT_JRUBY_OPTS=( --1.9 )
  </code></pre>
  
  <p>However, that line seems to do nothing, and if I set the environmental variables, RVM actually unsets them.</p>
  
  <p>So, how am I supposed to do this?</p>
  
  <p>(Note that I have this at the bottom of my .bashrc file, which is how I believe I'm supposed to use rvm:)</p>
  
  <pre><code>[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
  </code></pre>
  
  <h3>Example:</h3>
  
  <pre><code>$ JRUBY_OPTS=--1.9 jruby -v
  jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_27) [darwin-x86_64-java]
  
  $ export JRUBY_OPTS=--1.9
  $ jruby -v
  jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_27) [darwin-x86_64-java]
  $ env | grep JRUBY_OPTS
  [empty result]
  </code></pre>