kashyap
2009-Sep-28 06:22 UTC
Error with flash and form_authenticity_token in new rails application with scaffolding
Hi All, I get this strange problem with newly scaffolded apps - I''d really appreciate any help in this regard. /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:46:in `block in secure_compare'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:45:in `each'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:45:in `secure_compare'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:28:in `verify'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/cookie_store.rb:156:in `unmarshal'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/cookie_store.rb:145:in `load_session'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:62:in `block in load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:70:in `stale_session_check!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:61:in `load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:28:in `[]'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/request_forgery_protection.rb:102:in `form_authenticity_token'' (eval):2:in `form_authenticity_token'' /home/kashyap/Lab/sitara/app/views/resources/new.html.erb:3:in `_run_erb_app47views47resources47new46html46erb'' /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:29:in `new'' I bypass this by commenting out protect_from_forgery from the application_controller Another problem I get is with flash - /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:46:in `block in secure_compare'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:45:in `each'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:45:in `secure_compare'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:28:in `verify'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/cookie_store.rb:156:in `unmarshal'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/cookie_store.rb:145:in `load_session'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:62:in `block in load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:70:in `stale_session_check!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:61:in `load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:28:in `[]'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/flash.rb:163:in `flash'' /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:47:in `block in create'' /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:45:in `create'' I have to remove the calls to flash from all location for this. Regards, Kashyap
Frederick Cheung
2009-Sep-28 07:25 UTC
Re: Error with flash and form_authenticity_token in new rails application with scaffolding
On Sep 28, 7:22 am, kashyap <ckkash...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi All, > I get this strange problem with newly scaffolded apps - I''d really > appreciate any help in this regard.Sounds like this bug in 2.3.4: https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234 Fred> > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:46:in `block in secure_compare'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:45:in `each'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:45:in `secure_compare'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:28:in `verify'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/cookie_store.rb:156:in `unmarshal'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/cookie_store.rb:145:in `load_session'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:62:in `block in load!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:70:in > `stale_session_check!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:61:in `load!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:28:in `[]'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/request_forgery_protection.rb:102:in > `form_authenticity_token'' > (eval):2:in `form_authenticity_token'' > /home/kashyap/Lab/sitara/app/views/resources/new.html.erb:3:in > `_run_erb_app47views47resources47new46html46erb'' > /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:29:in > `new'' > > I bypass this by commenting out protect_from_forgery from the > application_controller > > Another problem I get is with flash - > > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:46:in `block in secure_compare'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:45:in `each'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:45:in `secure_compare'' > /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ > active_support/message_verifier.rb:28:in `verify'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/cookie_store.rb:156:in `unmarshal'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/cookie_store.rb:145:in `load_session'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:62:in `block in load!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:70:in > `stale_session_check!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:61:in `load!'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/session/abstract_store.rb:28:in `[]'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ > action_controller/flash.rb:163:in `flash'' > /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:47:in > `block in create'' > /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:45:in > `create'' > > I have to remove the calls to flash from all location for this. > > Regards, > Kashyap
kashyap
2009-Sep-28 07:49 UTC
Re: Error with flash and form_authenticity_token in new rails application with scaffolding
On Sep 28, 12:25 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sep 28, 7:22 am, kashyap <ckkash...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi All, > > I get this strange problem with newly scaffolded apps - I''d really > > appreciate any help in this regard. > > Sounds like this bug in 2.3.4:https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-... > > Fred >Thank you very very much ... That was exactly the problem ... I applied the patch and things work just fine!!!!! Regards, Kashyap