I was logged in my rails web app in firefox which is running on Ubuntu (WEBRick). I restarted the server and tried to continue to use the app and I get this: Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html This happened before, but now I know that it is related to the server restart. It happened on the other machine too.. When I restart the firefox, I can login again - no problems. What is this? Perhaps it is related to session state.. maybe I should catch that exception somewhere and clear the session variables and present the login form? How is this solved in other applications. Thank you for your time ! David -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
update: when I run "rake tmp:clear" on server to clear sessions, logging in works again on the client. So it really is something with sessions. It seems that when ubuntu is restarted, webrick is forcefully closed and the sessions remain on disk (they are stored there as far as I know).. when all comes back, hmm. wait. it should continue to work if the state was saved on disk.. but it doesn''t .. so rake tmp:clear solves the problem, but I still don''t quite understand or know what is the best way to solve this. Thank you again David Krmpotic wrote:> I was logged in my rails web app in firefox which is running on Ubuntu > (WEBRick). I restarted the server and tried to continue to use the app > and I get this: >-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
sorry, forgot to mention that this doesn''t happen always when I restart the server.. I tried a few times now and it works like nothing happened (user remains logged in - this is because sessions remain on disk). So it''s even stranger.. Now I cannot get the error back to examine it further.. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
David Krmpotic wrote:> > sorry, forgot to mention that this doesn''t happen always when I restart > the server.. I tried a few times now and it works like nothing happened > (user remains logged in - this is because sessions remain on disk). So > it''s even stranger.. Now I cannot get the error back to examine it > further.. >David, I remember similiar ''problems''. Could it be that you restarted server because you changed some code and objects in session dont have equal structure anymore? best, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> David, I remember similiar ''problems''. Could it be that you restarted > server because you changed some code and objects in session dont have > equal structure anymore? > > best, > Bojan >Thank you for the answer.. No, I don''t think so, because I''m only saving primitive types in session (int, string). hmm.. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---