I am storing some objects in session. Those classes are defined in
/lib/graphalg.rb. So I am requiring it automaticaly. But when computing
next request, following error is occured:
Session contains objects whose class definition isn’t available.
Remember to require the classes for all objects kept in the session.
(Original exception: wrong constant name GraphAlg:: [NameError])
I’ve tried to add require ‘GraphAlg’ to enviroment.rb, (of course)
doesn’t matter.
I am storing some objects in session. Those classes are defined in
/lib/graphalg.rb. So I am requiring it automaticaly. But when
computing
next request, following error is occured:
[usual warning about it being naughty to put objects in the session]
Session contains objects whose class definition isn’t available.
Remember to require the classes for all objects kept in the session.
(Original exception: wrong constant name GraphAlg:: [NameError])
I’ve tried to add require ‘GraphAlg’ to enviroment.rb, (of course)
doesn’t matter.
Unless that’s a typo, require ‘graphalg’ is what you should be typing.
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.