开发者

Lock jruby to ruby 1.9 permanently

I want my jruby 1.6.1 installation to operate with ruby 1.9 mode only. I want to uninstall or surely disable the support for 1.8.7 because I do not want to pull my hair out if I forget to set the environment or the command line parameter somewhere.

And also! I have another JRuby (1.5.1) installation on my machine which I want to keep there in safety using ruby 1.8.7. I would like to have ruby 1.9 compatibility when (and only when) I choose "c:\opt\jruby-1.6.1" as "Ruby platform" in NetBeans, or I set my PATH to include "c:\opt\jruby-1.6.1\bin", and so on.

开发者_运维技巧

All words in one: I want to lock my jruby installation to a ruby version regardless of the environment. Or is there a jruby 1.6.1 installer with ruby 1.9 exclusively? If not, why not? Should I even wish for that?


You can specify the JRUBY_OPTS environment variable: JRUBY_OPTS = --1.9

If you do it in your Windows system environment variables it will always apply anywhere a JRuby executable runs.

If you only add it to your Netbeans project properties then you could have it different depending on which configuration you select. e.g. Don't set it for your JRuby 1.5.1 configuration.

You cannot have it change automatically just by changing your PATH environment variable though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜