LoginSignup
2
1

More than 5 years have passed since last update.

RVM経由でJRubyのデフォルト処理系バージョンを指定する方法

Posted at

RVMでインストールするJRubyが1.8互換モードだったので、標準で1.9が使いたい。

ので、インストール時にパラメータを指定してあげる。

$ rvm install jruby --1.9

で、こんな感じ。

$ jruby -v
jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-08-06 26e08ba) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_33) [darwin-x86_64-java]

1.8系が使いたい時は JRUBY_OPT で指定できる。

$ export JRUBY_OPTS=--1.8
$ jruby -v
$ jruby 1.6.7.2 (ruby-1.8.7-p357) (2012-08-06 26e08ba) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_33) [darwin-x86_64-java]
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1