On Tue, Nov 24, 2009 at 6:13 PM, George Adamson <[email protected]> wrote: > It seems that merb on windows is requiring a restart every time I > modify a Model or Controller. > > I'm using merb 1.0.15 with datamapper 0.10.2 on JRuby in Windows. > > I've used merb on mac in the past and it did not require so many > restarts. > The restarts are particularly frustrating given the slow start-up of > jruby and the need to confirm "Terminate batch job (Y/N)? y" when > stopping merb. > > I see this has been a problem in the past: > http://groups.google.com/group/merb/browse_thread/thread/c1f52f7773eea4a1/2add7dd175d0717e?lnk=gst&q=restart#2add7dd175d0717e > > http://groups.google.com/group/merb/browse_thread/thread/bd99c7d182b1a979/77039e6b50f76cf6?lnk=gst&q=restart#77039e6b50f76cf6
Make sure :reload_classes option is set to true for the environment you want to run in. Internally, Merb maintains an associative array of last modified times for models, controllers, etc. Every 0.5 seconds (or the time specified by the :reload_time option), it checks to see if those last modified times differ. File#mtime is called, and so (my guess) would be that this behaviour differs somehow on Windows (see http://stackoverflow.com/questions/948770/how-accurate-is-ruby-mtime-and-friends). Alex -- You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/merb?hl=en.
