what is the best way to make JRuby to run in 1.9 mode by default?
i.e, I want to run rake test
instead of jruby --1.9 -S rake test
Thank you
Use the JRUBY_OPTS
environment variable. JRUBY_OPTS
holds a list of arguments that are added to any arguments specified on the command line.
For example (on Linux):
$ jruby -v jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java HotSp... $ export JRUBY_OPTS=--1.9 $ jruby -v jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java HotSpot(TM... $ export JRUBY_OPTS=--1.8 $ jruby -v jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java HotSpo...
An alternative solution is to put the following line (and other settings) in your ~/.jrubyrc file
compat.version=1.9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With