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

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

Thank you very very much ... That was exactly the problem ... I applied the patch and things work just fine!!!!! Regards, Kashyap