I found a way to run JRuby with JRebel!
The trick is to run JRuby with a Nailgun server that uses JRebel as follows:
jruby --ng-server -J-javaagent:/Applications/ZeroTurnaround/JRebel/jrebel.jar -J-noverify
Now the rails application can be launched using Nailgun:
jruby --ng -S rails server
If rails uses Java classes somewhere and it can find the correct rebel.xml, JRebel will record the changes and you will no longer need to restart the rails.
$CLASSPATH << "#{RAILS_ROOT}/java/target/classes"
JRuby / JRebel still needs additional work, since JRuby does not pick up changes to class declarations, but only the contents of known methods.
source share