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
this option was parsed with jruby nailgun hook only, i have added a new hook to parse only this options (no ng):
rvm get head chmod +x ${rvm_path}/hooks/after_use_jruby_opts
and it should work upon entering directory with this option