How to run Ruby 2.0 with JRuby 1.7?

前端 未结 1 1624
一整个雨季
一整个雨季 2020-12-29 03:31

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

相关标签:
1条回答
  • 2020-12-29 04:17

    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
    
    0 讨论(0)
提交回复
热议问题