views:

107

answers:

2

I am developing an app in JRuby on Rails. For some reason, when I edit the view files, the development JRuby Mongrel server doesn't reload them. The perplexing thing is that after editing the controller files, the server reloads them just fine on the next request.

This would be annoying even when using MRI Ruby, however starting up JRuby Mongrel after every view edit is much slower, and much more annoying. (Note that once it starts up it's quite fast, the only issue is startup--the JVM has to load up every time I start JRuby Mongrel.)

I'm running JRuby 1.5.0, Rails 2.3.5, and Java 6.

+1  A: 

Sounds like a bug to me. I'd encourage you to file one at bugs.jruby.org or stop by #jruby on freenode to help us figure out what's wrong. JRuby should not be any different in behavior than C Ruby for anything Rails.

Nick Sieger
I found that this only happens when I enable config.threadsafe! in environment.rb. Nick, is this expected behavior?
thekingoftruth
+1  A: 

I found that removing config.threadsafe! in config/environment.rb and restarting the script/server enables auto-reloading of view files again.

This may still be a bug in JRuby, but I'm not sure.

thekingoftruth