Re: [Rails] uninitialized constant ActionController::Flash::FlashHash [NameError])

484 views
Skip to first unread message

Colin Law

unread,
Jul 25, 2012, 3:19:02 AM7/25/12
to rubyonra...@googlegroups.com
On 23 July 2012 21:43, Tommy Pollák <kas...@osttimorkommitten.se> wrote:
> My application, a very simple general ledger, that worked very well until
> June 26 does not work any longer. It is used under Ubuntu 12.04 and I
> believe there was a Ruby update after that.
>
> What happens?
>
> When I try to start the appIication I get the following output in my web
> browser:
>
> ActionDispatch::Session::SessionRestoreError
>
> Session contains objects whose class definition isn't available.
> Remember to require the classes for all objects kept in the session.
> (Original exception: uninitialized constant
> ActionController::Flash::FlashHash [NameError])

Have you tried clearing the cookies in your browser? Or try it with a
different browser or from a different machine.

Colin

Frederick Cheung

unread,
Jul 25, 2012, 5:22:14 AM7/25/12
to rubyonra...@googlegroups.com

On Monday, July 23, 2012 9:43:49 PM UTC+1, Tommy Pollák wrote:


The clue is this



ActionDispatch::Session::SessionRestoreError 
Session contains objects whose class definition isn't available. Remember to require the classes for all objects kept in the session.
(Original exception: uninitialized constant ActionController::Flash::FlashHash [NameError])


The session contains serialised ruby objects and in this instance contains an object that rails couldn't deserialize. If my memory is correct, ActionController::Flash::FlashHash was the name of the class that held the session values in older versions of rails - it looks like you might have accidentally upgraded rails. Clearing out sessions should fix this, although the upgrade might of course cause problems elsewhere.

Fred

Tommy Pollák

unread,
Jul 25, 2012, 9:23:35 AM7/25/12
to rubyonra...@googlegroups.com, cla...@googlemail.com
Thanks! Works perfectly!

Tommy Pollák

unread,
Jul 25, 2012, 9:25:00 AM7/25/12
to rubyonra...@googlegroups.com
Thanks!
Seems your description is relevant, see answer to previous advice.
Reply all
Reply to author
Forward
0 new messages