How to make JRuby 1.6 default to Ruby 1.9?

前端 未结 6 1793
北海茫月
北海茫月 2020-12-02 05:26

what is the best way to make JRuby to run in 1.9 mode by default?

i.e, I want to run rake test instead of jruby --1.9 -S rake test

<
6条回答
  •  甜味超标
    2020-12-02 05:53

    When using warbler to package an app as a war file, the version can be set by running:

    warble config
    

    which creates a config/warble.rb file. This file contains lots of comments on how to configure warbler, and in particular:

      # Set JRuby to run in 1.9 mode.
      # config.webxml.jruby.compat.version = "1.9"
    

    Uncomment the second line by removing the #, and re-package your war with the warble command.

提交回复
热议问题