This project is archived and is in readonly mode.
Rails 2.3 is caching views in development mode
Reported by mlopes | March 27th, 2009 @ 11:20 AM | in 2.x
Ok, I've just upgraded a big application to Rails 2.3 with no major issues to point except for a show-stopper that's consuming too much time. Rails is caching views in development mode.
In an attempt to figure out where's the problem coming from, I created a whole new rails application and views were working fine. Based on that I double-checked the config files. Botch cache_classes and cache_template_loading is set to false in development mode.
I took a sneak at the plugins to see whether one culprit could be causing this. I'm currently using the following plugins:
aasm acts_as_list configurator libmemcached_store smurf workling_mailer action_mailer_tls acts_as_versioned exception_notification paperclip restful_authentication spawn active_scaffold betternestedset globalize2 permalink_fu simple_access_control workling
In order for Rails 2.3 to work I had to update a bunch of them, namely Smurf, ActiveScaffold, mislav-will_paginate (as a gem).
Any ideas what could be causing this issue? In short, so we can nail down the source of this bug, all config files are Ok and don't port any old settings. View caching is explicitly disabled in development mode. I'm using Rails 2.3.2. On a fresh application, everything is ok.
I can run some specific battery of tests if you want me so.
Regards.
Comments and changes to this ticket
-
mlopes March 27th, 2009 @ 11:24 AM
Forgot to mention, the workaround is restarting Mongrel for Rails to refresh the views...
-
mlopes March 27th, 2009 @ 11:56 AM
Ok, found the issue. config.threadsafe! was enabled in development mode.
I don't know whether this is a bug or a feature (threadsafety is not ought to be enabled in dev mode), but it was causing views not to be reloaded in development mode and some other strange behavior as well like controller classes not being found from time to time.
-
thedarkone March 27th, 2009 @ 03:09 PM
Constant and view reloading are both not threadsafe, so neither is going to work with
config.threadsafe!
. Also freshly generated Rails app doesn't containconfig.threadsafe!
indevelopment.rb
at all. No bugs here. -
CancelProfileIsBroken March 27th, 2009 @ 03:48 PM
- State changed from new to invalid
Agreed. This has been documented in various spots. If you spot somewhere in the RDoc or Guides that we could make it clearer, please submit a ticket on the docrails project.
-
mlopes March 27th, 2009 @ 03:51 PM
It could be my fault, but it took me several hours to figure this one out. If someone is with me on this one, please open a ticket for a huge warning on the docrails project (probably is a known issues section - something that would get properly indexed on Google while searching for 'rails 2.3 caching views in development mode'.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>