How to run Ruby 2.0 with JRuby 1.7?

不羁岁月 提交于 2019-11-29 05:11:01

问题


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


来源:https://stackoverflow.com/questions/15281036/how-to-run-ruby-2-0-with-jruby-1-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!