views:

39

answers:

2

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?

Edit

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..!

A: 

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

rogerdpack
sorry.. but is a plugin and a middleware same.?
ZX12R
I'm not sure but there may be something similar.
rogerdpack
A: 

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.!

ZX12R