How do I use JRUBY_OPTS with RVM?

后端 未结 5 729
青春惊慌失措
青春惊慌失措 2020-12-28 09:56

It seems that the idiomatic way to provide flags to JRuby in an RVM-based Rails project is to set the environmental variable JRUBY_OPTS or PROJECT_JRUBY_OPTS, the latter per

5条回答
  •  生来不讨喜
    2020-12-28 10:23

    I put export JRUBY_OPTS="..." in my project's .rvmrc, at the bottom of the file. This works for me.

    export JRUBY_OPTS="--1.9 -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseConcMarkSweepGC -J-XX:MaxPermSize=256m -J-Xmx1024m"
    
    $ jruby -v
    jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
    

提交回复
热议问题