What is the best way to get JRuby to run in 2.0 mode?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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