Jruby using 1.8.7 or 1.9.2

This is probably a simple question.

When I am using jruby how do I no which syntax jruby is using 1.8.7 or
1.9.2 can i switch between them (disregarding the irb). Became
concerned when I notice the gems installed with jruby -S gem install
some_gem were installiing to 1.8.

Does jruby use 1.8.7 by default? If yes how can I switch it to 1.9.2?


JRuby uses 1.8.7 mode by default. You can set JRUBY_OPTS env variable to
“–1.9” (or --1.9 followed by any other arguments jruby executable can
take, for example, additional JVM options) to make JRuby use 1.9.2 mode.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs