Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Ruby 2.0 with JRuby 1.7?

What is the best way to get JRuby to run in 2.0 mode?

like image 837
Sébastien Le Callonnec Avatar asked Mar 07 '13 20:03

Sébastien Le Callonnec


1 Answers

For a specific script, you can use the --2.0 option:

jruby --2.0 -S rails s 

For setting 2.0 as the default value, set JRUBY_OPTS:

export JRUBY_OPTS=--2.0 

You can also set the value in ~/.jrubyrc:

compat.version=2.0 
like image 148
Sébastien Le Callonnec Avatar answered Sep 22 '22 20:09

Sébastien Le Callonnec