Tommy Pollák
2012-Jul-23 20:43 UTC
uninitialized constant ActionController::Flash::FlashHash [NameError])
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]) The environment is Rails 3.2.1 => Booting WEBrick => Rails 3.2.1 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2012-07-23 22:24:03] INFO WEBrick 1.3.1 [2012-07-23 22:24:03] INFO ruby 1.9.3 (2011-10-30) [i686-linux] and the console contains Started GET "/" for 127.0.0.1 at 2012-07-23 22:24:07 +0200 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]) ): actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:62:in `rescue in rescue in stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:58:in `rescue in stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/cookie_store.rb:51:in `unpacked_cookie_data'' rack (1.4.1) lib/rack/session/cookie.rb:98:in `extract_session_id'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `block in extract_session_id'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `extract_session_id'' rack (1.4.1) lib/rack/session/abstract/id.rb:43:in `load_session_id!'' rack (1.4.1) lib/rack/session/abstract/id.rb:32:in `[]'' rack (1.4.1) lib/rack/session/abstract/id.rb:262:in `current_session_id'' rack (1.4.1) lib/rack/session/abstract/id.rb:268:in `session_exists?'' rack (1.4.1) lib/rack/session/abstract/id.rb:107:in `exists?'' rack (1.4.1) lib/rack/session/abstract/id.rb:122:in `load_for_read!'' rack (1.4.1) lib/rack/session/abstract/id.rb:64:in `has_key?'' actionpack (3.2.1) lib/action_dispatch/middleware/flash.rb:258:in `ensure in call'' actionpack (3.2.1) lib/action_dispatch/middleware/flash.rb:259:in `call'' rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'' rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:in `call'' activerecord (3.2.1) lib/active_record/query_cache.rb:64:in `call'' activerecord (3.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'' activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `_run__967158296__call__1011983202__callbacks'' activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_callback'' activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'' activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'' actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/reloader.rb:65:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'' railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app'' railties (3.2.1) lib/rails/rack/logger.rb:16:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call'' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'' rack (1.4.1) lib/rack/runtime.rb:17:in `call'' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'' rack (1.4.1) lib/rack/lock.rb:15:in `call'' actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call'' railties (3.2.1) lib/rails/engine.rb:479:in `call'' railties (3.2.1) lib/rails/application.rb:220:in `call'' rack (1.4.1) lib/rack/content_length.rb:14:in `call'' railties (3.2.1) lib/rails/rack/log_tailer.rb:14:in `call'' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'' /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'' /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'' /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'' Rendered /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms) Rendered /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.6ms) Rendered /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (5.4ms) I have installed RubyGems 1.8.24 and use rbenv to control versions. How do I avoid the crash? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6QMs5C4YiZYJ. For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2012-Jul-25 07:19 UTC
Re: uninitialized constant ActionController::Flash::FlashHash [NameError])
On 23 July 2012 21:43, Tommy Pollák <kassor-hQAhlroVPTjped5Vm0LI4NXl3P/j4wiQ@public.gmane.org> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2012-Jul-25 09:22 UTC
Re: uninitialized constant ActionController::Flash::FlashHash [NameError])
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/9Ek-YroEdl8J. For more options, visit https://groups.google.com/groups/opt_out.
Tommy Pollák
2012-Jul-25 13:23 UTC
Re: uninitialized constant ActionController::Flash::FlashHash [NameError])
Thanks! Works perfectly! Den onsdagen den 25:e juli 2012 kl. 09:19:02 UTC+2 skrev Colin Law:> > On 23 July 2012 21:43, Tommy Pollák <kassor-hQAhlroVPTjped5Vm0LI4NXl3P/j4wiQ@public.gmane.org> 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 >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/NEh7q_TggoMJ. For more options, visit https://groups.google.com/groups/opt_out.
Tommy Pollák
2012-Jul-25 13:25 UTC
Re: uninitialized constant ActionController::Flash::FlashHash [NameError])
Thanks! Seems your description is relevant, see answer to previous advice. Den onsdagen den 25:e juli 2012 kl. 11:22:14 UTC+2 skrev Frederick Cheung:> > > 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 >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/UTRDa5rNlsoJ. For more options, visit https://groups.google.com/groups/opt_out.
Maybe Matching Threads
- cannot load such file -- openssl (again)
- Encoding issues when uploading files
- request.format = :mobile causes error "undefined method `ref' for nil:NilClass"
- Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
- Rspec not running properly