Tutorial :A copy of [middleware] has been removed from the module tree but is still active! - error


We use rails version 2.3.5

This error has been reported in SO here

I tried the following:

  • adding config.cache_class = true - the problem with this was that, the server had to be restarted every time a change was made to any controller. Also the server start time was too long
  • adding unloadable to the middleware - no use
  • adding config.middleware.use [middleware] to development.rb - no use

Is there a way to overcome this other than making development similar to production?


even tried adding config.middleware.use [middleware] to environment.rb. Well this behaved totally different. My error disappeared, but my middleware cracked. All it's objects were nil..!


maybe you need to make a plugin reloadable? refs: http://blog.yves-vogl.me/2010/01/12/automatically-reload-rails-plugins/ Rails auto-reloading plug in development mode et al


Found the answer.

 adding config.middleware.use [middleware] to environment.rb  

this was not working previously for me because i was initializing this middle ware inside session_store too. So the same middle ware was executed twice with the second time all params with nil - Hence the nil problem.

Thank you rogerdpack for trying to help.!

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »