4

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

Community
  • 1
  • 1
ZX12R
  • 4,760
  • 8
  • 38
  • 53

2 Answers2

0

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

Community
  • 1
  • 1
rogerdpack
  • 62,887
  • 36
  • 269
  • 388
0

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
  • 4,760
  • 8
  • 38
  • 53